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)

Friday September 28, 2001
10:48 AM


[ #828 ]
Okay, I'm not actually sleepwalking, but it feels like it sometimes. I crashed pretty hard at 5:30 and woke up around 10ish, so with three or four solid hours of sleep I should be ready for the day.

Ha, ha, ha, ha.

However, I am very ready to test my new copy of the program. It occurred to me last night, before I hit pillow, that I couldn't do what I was trying to do: Split by spaces instead of some other symbol.

The program we're using for database creation results in stuff like this:

{eight spaces}number{one space}name

The problem is, these 'name's can have spaces in them as well.

"Oh, you mean you only have to clear the first eight spaces (which you already have the regexp for) and then turn the first space after that into a colon or something."

Yeah. I know. One sentence, and I could have solved this a week ago.

Okay, pressing on. I am about to run this new program; as far as I can tell, I have cleaned out typos and bugs, added my one regexp, fixed the variables and the print statement, and it's ready to rock. If this is workable, then I have actually finished one of the user tools.

perl add_inv.p

syntax error at add_inv.p line 31, near "split(:" Execution of add_inv.p aborted due to compilation errors.

Ah, okay. Did that last night, too, with another statement. I keep forgetting you have to type the $_ in with some of it, and not with others of it...I think that's the problem, anyway. It could also be that I didn't quote the argument to split, so I'll try both (on the basis that they're easy to undo if it turns out they don't fix it, and they're so small that they really only count as one thing.)

perl add_inv.p

Scalar found where operator expected at add_inv.p line 31, near ")$_" (Missing operator before $_?) syntax error at add_inv.p line 31, near ")$_" Execution of add_inv.p aborted due to compilation errors.

Note to self: You're not smart enough to do this without checking reference materials yet. ::grab copy of Nutshell::

Duh, of course. The format is split (/pattern/), string with a comma. I'm such a doodyhead.

perl add_inv.p

Useless use of a variable in void context at add_inv.p line 31. Use of uninitialized value in numeric eq (==) at add_inv.p line 28, line 1 .

Hmm, yes...ah! This executed, which means there's about even odds it did exactly what I need it to do. Time to check the inventory file and see what it looks like.

It works.

Okay. First user tool down, one to go (the program for printing invoices, does it all in one big batch, should be fairly easy now that I know what format does and all) but between now and invoicer comes the big, bad program I've been shuddering about.

The CGI.