my $found_date = 0; LINE: while ($currentfile=<FILE>) { if (!$found_date and $currentfile =~ /^\d{6}/){ $match_date = substr($currentfile,52,10); if ($search_date eq $match_date) { $found_date = 1; } } next unless $found_date; print RESULTS "$currentfile"; }
In reply to Re: Looping through end of file once a match is found
by Transient
in thread Looping through end of file once a match is found
by MBolton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |