I want to test the next line in a file to see if it is a certain type, or a new data set, or the end of file. Any idea how I can do this?
my $current = <$handle>; while (my $next = <$handle>){ # your loop here $current = $next; }
In the loop body have the current and the next line available.
In reply to Re: Matching next line in text file
by moritz
in thread Matching next line in text file
by YYCseismic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |