in reply to Re^2: Parsing/regex question
in thread Parsing/regex question
should skip everything up to the datestamp
oops, missed the "---" line. Adding one line of code addresses that:
my $position_rolled = 0; while (<$fh>) { chomp; if ($position_rolled) { next if !/^... .\d 20\d\d/; $position_rolled = 0; $position_rolled_into = $_; } elsif ($_ eq 'Position has rolled into') { $position_rolled = 1; } ... }
|
|---|