my %seen; while(<LOG>){ foreach my $i (@newips){ print OUTFILE if /\;drop;[^"]*$i/ && ++$seen{$i} <= 500; } } [download]
In reply to Re: Correct Loop Structure by ysth in thread Correct Loop Structure by Dru