in reply to Correct Loop Structure
TMTOWTDI, this way with a slice:
open (LOG, "$fw_logfile") or die and mail_error($!); open (OUTFILE, "+>>$outfile") or die and mail_error($!); my $seen = 0; while(<LOG>){ foreach my $i (@newips[0..499]){ print OUTFILE if (/\;drop;[^"]*$i/) && $seen++; } }
|
|---|