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++; } }
In reply to Re: Correct Loop Structure
by Art_XIV
in thread Correct Loop Structure
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |