"John W. Krahn" wrote: > > open FH, 'c:/foobar.txt' or die "sourcefile open failed - $!"; > while ( <FH> ) { > next if 1 .. /^-+$/; > next if /^The command completed successfully/ .. eof( FH ); > print "$_\n" for /\S+/g; > }
Or better: :-) open FH, 'c:/foobar.txt' or die "sourcefile open failed - $!"; while ( <FH> ) { next if 1 .. /^-+$/; last if /^The command completed successfully/; print "$_\n" for /\S+/g; } John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>