use strict; use warnings; open RERUN, "rerunlrg" or die "Can't open rerunlrg: $!"; while () { next if $. % 2 == 0; # Skip the second, fourth, ... line if (m[(\S+)\s+(\S+)]) { print "Matched: $1 $2\n"; } } close RERUN;