in reply to Reading a Filehandle by line or by stream
Of course I am assuming that the END text string is the first thing and only thing on the line.open (FH,"filename here") or die; while ( my $line = <FH> ) { DO STUFF HERE WITH LINES; last if $line =~ /^END$/; } close(FH);
|
|---|