That is, I *had* to suddenly when I realized it was the most efficient way to deal with part of the inventory conversion code.
"Why is there an inventory conversion code?" I hear you ask. Ah, good question. There is already a VERY powerful tool for making enormous lists of this special type of inventory out of an absolutely gargantuan, already-compiled list of this special inventory. Entering all of these by hand would be ludicrousy inefficient; entering them all by their universal recognition number would be efficient if that number were *ON* them, which it is not. Hence, the best thing I can think of: Make the list in something else, convert to what we need. It is an imperfect solution that (hopefully) will be perfectly adequate. Such is life.
When I sat and looked through both Learning Perl and Perl In A Nutshell, eventually it occurred to me that the entire code was going to be maybe fifteen lines total. The nagging voice of doubt in my mind said:
"It took you this long to understand what you need for fifteen lines of code, probably less?"
And I was reminded of the apocryphal tale of the engineer and the train. I'm glad I'm starting to become more like the engineer and less like the passengers, honestly. I've always believed in careful application of minimal force, and as far as I can tell, it's something Larry Wall believes in too. (Laziness.)
Motivated Laziness. Maybe I should call my design company that. (Maybe not.)
Anyway, that being such a short program with such small nuance, I'll put an example of code in the next set of journal entries, the ones about the CGI program. (Which, by my estimate, will be the hardest part of this whole exercise.)
So. Be well, and be sane, and hopefully I'll have a better tagline someday.