Slash Boxes
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)

  (email not shown publicly)
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 [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Thursday October 11, 2001
06:43 PM

Hindsight Part Two

[ #971 ]

Chugging along. Building the engine that's going to strip out vital parts of the Cl**ster list and spit out just what I need.

"Y''re running that with an awfully small test file. Run it with the whole shebang and see how long it takes."

Not a bad idea.

It took about five minutes, which I kind of expected (I was piping it into the DOS more command, so it took longer than if it were dumping straight to a file) but what disturbed me was looking through the output.

"WTF?! These cards don't have prices!"

In my finite wisdom, I used : as a separator.

There are, to my understanding, less than twenty cards in that game I won't mention that have : in their *name*.


I loaded up both the files and threw some regex salad around, and in maybe ten minutes had everything working right with the separator =, as in name=stock=shown and name=price=low.

Regex Salad:
You will need:
1 head (roughly five cups) shredded iceberg lettuce
3 cups shredded romaine lettuce
2 cups washed, stemmed, shredded maple leaves

Sorry, I couldn't resist. (I tried a maple leaf once; it's actually a remarkable thing to eat, as long as you wash it first. I've seriously wanted to try a Caesar salad with some shredded maple leaves added. The crunch would be astonishing.)

Moving on, this format will have to do. I'm also going to have to add a bunch of "extras" to the price file format, because the client wants to be able to set artificial limits on the costs. High, low, etc., etc.

I also have to fix the inventory builder, because (ha ha) it leaves the new inventory file in the directory. Bad, bad, bad idea. "Hey, it didn't do anything. I'll run it again." Meanwhile the inventory is skyrocketing...bad, bad, bad idea. I'll just have it rename it (that way, if a bad inventory update happens, I'll just run my handy-dandy (read: not written yet) fixer program and it'll subtract all those nasty wrong inventory entries.)

I really, really, really wanted to post something to what pdcawley said in reference to Afghanistan and all that...but I decided not to. This site is something I use to focus my thoughts on Perl, because I'm not always good at focusing my thoughts. If I use it for other things, I may lose this focus.

This precious, precious focus of thought.

Okay. Back to code. In about one hour, I lose the computer and my free time. (My SO and cooking, respectively, take them up.) I'd best get as much done as I can; after this week, it's back to school.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.