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++; } }
Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"