in reply to Need to skip two lines
while(<SOURCE>) { my $source = $_; if($source =~ m/^(\s)*$/) { $source = <SOURCE> for 1..2; } #Go through each line until you hit page 1 of sorter 2 if (substr($source,145,16) =~ <b>/Page:\s*1/)</b> { $source = <SOURCE> for 1..2; if (substr($source,72,9) =~ /Sorter: 2/) { ++$dcount; printf LOGFILE $source; } } }
|
|---|