Help for this page
do { next LINE; print RESULTS "$currentfile"; } until eof();
my $matchFound = 0; while ($currentfile=<FILE>) { ... next unless $matchFound; print RESULTS $currentfile; }
my $currentfile = do { local $/ = undef; <FILE> }; my @parts = split /(^\d{6}).{46}$search_date)/m, $s, 2; print RESULTS @parts[1,2] if $parts[1];