in reply to Search String - next line

Naive stab:
while (<>) { next unless /$pattern/; for (1..$n){ undef = (<>); } print; last; }