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 ]

Journal of jbodoni (3320)

Monday March 17, 2003
03:34 PM

Powerbook G3 on the way...

So I'll be picking up G3 this week.

What are the first five things I should install or do? I don't have any reason to run OS9, and I've already heard about fink...


Wednesday November 27, 2002
04:24 PM

Attn: Brian Foy re: your journal entry #9143

Using Google's "link" feature (link:, it looks like Google hasn't found anyone that links to your journal entry.

And please consider enabling comments. 8)


Wednesday October 09, 2002
06:40 PM


The good news:
Krispy Kreme opened a store in my town.

The bad news:
It's within walking distance to my house!

The Fat Boy

Monday September 30, 2002
01:48 PM

Some actual Perl content: finding the previous week

I needed to find the start and end dates for the previous calendar week, and couldn't find anything pre-rolled, so here's what I came up with, which populates $startdate and $enddate. It'll be posted on perlmonks, but I wanted to show it here too. Does anyone have anything better, or any suggestions on how I can improve this?

Please be gentle, this is the first of my code I've posted for public consumption. 8)

    #    0    1    2     3     4    5     6     7     8
    # ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
    my $wday = (localtime(time()))[6] + 1;
    # how many days into the current week are we?

    my $endseconds   = time()      - ($wday * 24 * 60 * 60);
    # subtract that many days from today.  this tells us when Saturday (of the previous calendar week) was

    my $startseconds = $endseconds - (6     * 24 * 60 * 60);
    # six days before that was the Sunday we're interested in

    my $year  = (localtime($startseconds))[5] + 1900;
    my $month = (localtime($startseconds))[4] + 1;
    my $day   = (localtime($startseconds))[3];
    if (length($month) < 2) {$month = "0$month"}
    if (length($day)   < 2) {$day   = "0$day"}
    $startdate = "$year$month$day";

    $year  = (localtime($endseconds))[5] + 1900;
    $month = (localtime($endseconds))[4] + 1;
    $day   = (localtime($endseconds))[3];
    if (length($month) < 2) {$month = "0$month"}
    if (length($day)   < 2) {$day   = "0$day"}
    $enddate = "$year$month$day";

Sunday September 29, 2002
08:22 PM

The passing of a friend

No Perl content on this one. 8(

My buddy Tim died last night, succeeding at the task of drinking himself to death.

It's ironic, considering that when I met him, I bought him a beer. "You'll see," he said. "I never forget anyone that buys me a beer." That was true enough, but the corollary was even more true.

You see, anyone that bought Tim a beer will never forget him. A true friend, a wonderful musician, a joy to be around. It's heartbreaking that so many bad things happened to him in the last year that he was unable to rally and climb up out of the bottle. Thank goodness we've got his music to remember him by.

RIP Tim "Mad Dog" Layman 1966-2002

Tuesday September 24, 2002
11:26 PM

The best intentions are sometimes thwarted... new hardware.

The reports for High Priority and After Hours calls are done, then the new flat panel display showed up. It's one of the smaller ones (only 15"), but it took me about an hour to clean off my desk, relocate my two machines to a shelf above my desk, throw away a bunch of old literature, and generally clean stuff up.

By the time I left, all that was on my desk was my phone, monitor, keyboard, mouse, and a small pile of papers. Then (of course!) it was time to drive home.

Gotta break up the "current report" page into sections, just gotta. It turns out the CIO detests scrolling.

The next ORA book to be added to my collection will be the new Friedl effort, Mastering Regular Expressions. I've just about worn out the library's copy. 8)


Monday September 23, 2002
11:17 PM



What's important to know about me, in this context? Let's see...

(Playing right now: Linkin Park "In The End". What a great song. I normally don't care much for 'spoken word' art, but these guys strike a great balance between the spoken and the sung lyrics. Driving rythm, sweeping guitar chords, and a simple keyboard floating above it all.)

First should be that Perl makes me code with a grin on my face. That hasn't happened since... well, since I opened the shrinkwrap on the first HyperCard that hit the shelf in my town.

Second, I'm new - painfully so - to all things Perl. Granted, TMTOWTDI, but my way usually seems to be the WRONG way! I write code the wrong wrong way, make stupid mistakes, re-invent the wheel rather than use modules from CPAN, etc. Fortunately, as I learn more I'm able to go back to the programs I've written and re-work them.

Third, ... I dunno. I guess it's also important to know that I need my sleep. It's starting to get late. 8) What would you like to know?

Goals for tomorrow, while I'm still coherent:

  • Try to figure out why, oh why, does the web server not want to run my ODBC query? There will be much wailing and gnashing of teeth before this is over, I'm sure.
  • Make the weekly report generator dump out a page for my use that contains EndUser, RequestDate, ShortDescription, Body, and ResolutionText for all high priority calls.
  • Ditto for the after hours calls.
  • Consider breaking up the "Current Queue Report" into different sections, with hyperlinks to each section
  • Figure out how to use one of the "Date" modules to provide me with the start date and end date of the previous calendar week.
  • Start using, dammit!

(Playing right now: Joe Satriani "Circles". Satch just plain rocks. Note to self: beat the hell out of the CD player in my car until it works again, so I can listen to "Surfing With The Alien" with the top down before winter!)

G'night all.