in reply to Re: perl one line for advanced grep (current line and next one)in thread perl one line for advanced grep (current line and next one)
perl -ne '
print, $aft++, next if /PAT/;
$aft or next;
$aft = 0;'
Throwing nuclear weapons into the sun
Making everybody on Earth disappear
A threat from an alien with a mighty robot
A new technology or communications medium
Providing a magic fish to a Miss Universe
Establishing a Group mind
Results (194 votes). Check out past polls.