perl -ne ' print, $aft++, next if /PAT/; $aft or next; print "$_---\n"; $aft = 0;'