Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

chaoticset
  (email not shown publicly)
http://chaoticset.perlmonk.org/
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [perlmonks.org], and here [javajunkies.org] too, I ramble randomly in my philosophical blog [blogspot.com] and my other blog [blogspot.com]. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Sunday September 30, 2001
04:12 AM

Early Morning Revelation The Second

[ #839 ]
This is the second time that I've spent the whole night up and figured out a workable solution only a pot of coffee and hours later than I should be awake.

I was scribbling while sipping my cold coffee and thinking, "I'm going to sleep soon, God dammit. I have a big, honking, nasty day ahead of me." It always seems like the revelation comes all at once, but it does not. It comes in bits, the deception like a drink of water: To us, it is a single unit of something, but in reality, it is concerted effort on the part of reality.

Okay, I'm babbling. The point is, I thought, "Well, if I've got to match it, it'd help if it were sorted."

"Well, yeah, but I can't really sort it - I don't know how - unless I load it into an array and then dump the array back into the inventory file after."

"I guess I'll have to. Lessee... ::scribble scribble:: ...okay, that's there, and then...oooh, I could just load it in as an array at the beginning of the whole program and modify the array and then write the array back. Even for a database of a few thousand, that probably wouldn't take too long..."

"...okay. Drop the whole file into a 2-d array, 3 values by ever-how-many product in the inventory...then sort the array by the 0th value in each...next, match the (hopefully relatively few) new values to the whole product names and if they connect, increment the value in slot 1 of the array by the value for the amount of new product. If they're not, append it to the array and worry about it on the next sweep (because there's going to be sorting at almost every layer, and unsorted new inventory isn't a terrible tragedy, fix it later if it's a problem) so then I just dump it back to the inventory file."

Well, the scribbled version looks a lot more comprehensible. Maybe it's just the time, but that ALL looks like babble now.

I hope it isn't.