in reply to CGI script choking on localtime function call

not that i have a perl5.6 handy, but this snippet works fine here. Is there a possibility that your code dies somewhere else based on the resulting values of localtime?

Tip: wrap the offending part in an eval { ... } or die $@; block. See what $@ reports for you.

Replies are listed 'Best First'.
Re^2: CGI script choking on localtime function call
by nysus (Parson) on Feb 16, 2006 at 04:48 UTC
    Ah, yes. I'm a boob. The problem was with how the time values were used later on in the code. I was using the data returned by the localtime function to open a file that had a timestamp for its name. By subtracting 86400 seconds, I was trying to open a file that didn't exist. Thanks for snapping me out of my idiocy.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks