my $cntr = 0 my $stuff = "" LINE: while(<HTMLFILE>) { if($cntr == 0 && $_ !~ /$myregex/) { next LINE; } last LINE if $cntr >= 5; $stuff .= $_; $cntr++; }
In reply to Re: grabbing N lines after matching one?
by BastardOperator
in thread grabbing N lines after matching one?
by jptxs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |