in reply to Correct Loop Structure
Put $seen = 0; inside the while loop but outside of the foreach.
Update: Although I'd probably do something clsoer to
while(<LOG>){ foreach my $i (@newips){ if (/\;drop;[^"]*$i/) { print OUTFILE for 1 .. 500; } } }
(Untested)
|
|---|