mikevanhoff has asked for the wisdom of the Perl Monks concerning the following question:
$success = 0; open(FILE,"dumptape.log") or die ("Could not open file"); while(<FILE>) { if (/Dump phase number 3/) { while (<FILE>) { readline(<FILE>); print; <FILE> ; } # print; $success = 1; last; } } if(!$success) { print "Failed dump log\n"; #do other failed dump log stuff here } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting Text Lines
by tedrek (Pilgrim) on Jul 31, 2003 at 03:44 UTC | |
by liz (Monsignor) on Jul 31, 2003 at 08:01 UTC | |
|
Re: Extracting Text Lines
by talexb (Chancellor) on Jul 31, 2003 at 02:20 UTC | |
by Cine (Friar) on Jul 31, 2003 at 15:14 UTC | |
|
Re: Extracting Text Lines
by mildside (Friar) on Jul 31, 2003 at 03:08 UTC |