in reply to Re: Monk Specs.?
in thread Monk Specs.?

um... your points are valid, but this code is incorrect. *ducks*

while ( <LOG> ) { if ( /$date/ ) { print <LOG>; } }
firstly, you're reading from and printing to the same filehandle, probably a typo. it should print LOGFILE;. secondly, it's only printing lines that match the date, instead of printing all lines from the matched date until the end of the file.

~Particle

Replies are listed 'Best First'.
Re: Re: Re: Monk Specs.?
by talexb (Chancellor) on Jan 16, 2002 at 20:41 UTC
    Hmm .. don't think my code is wrong. The if statement watches for the correct date, and when that date's found, the entire rest of the file is output. My original reply had output going to STDOUT, but I later fixed that so it went to LOG_FILE, as in the original post. The input file handle is LOG.

    --t. alex

    "Of course, you realize that this means war." -- Bugs Bunny.