jgatrell42 has asked for the wisdom of the Perl Monks concerning the following question:
Thanks JGatrell42use List::Util qw(first); open (LOG, ">>$LogFileName")||die("Can not open Log file\n"); my ($FileProcessed) = first{$_ eq $FileName}<LOG>; close(LOG); if ($FileProcessed){ print("$FileName Found in Log file\n"); }else{ print("$FileName NOT Found in Log file\n"); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Find a filename in a text file
by jwkrahn (Abbot) on Feb 11, 2008 at 20:44 UTC | |
Re: Find a filename in a text file
by toolic (Bishop) on Feb 11, 2008 at 20:54 UTC | |
Re: Find a filename in a text file
by Khen1950fx (Canon) on Feb 11, 2008 at 22:09 UTC | |
by jwkrahn (Abbot) on Feb 12, 2008 at 02:46 UTC | |
Re: Find a filename in a text file
by sh1tn (Priest) on Feb 11, 2008 at 21:39 UTC | |
Re: Find a filename in a text file
by dcd (Scribe) on Feb 12, 2008 at 15:25 UTC |