in reply to Reading a Filehandle by line or by stream

Would this work:
open (FH,"filename here") or die; while ( my $line = <FH> ) { DO STUFF HERE WITH LINES; last if $line =~ /^END$/; } close(FH);
Of course I am assuming that the END text string is the first thing and only thing on the line.