This is where your trouble is. You probably meant to write it thusly:if($line =~ m/ on $ipaddress/) { if (scalar(@matches) <= 2){ push(@matches, $line); } else { exit(0); } foreach $line (@matches){ print "$line\n"; } }
if($line =~ m/ on $ipaddress/) { if (scalar(@matches) <= 2){ push(@matches, $line); } else { foreach $line (@matches){ print "$line\n"; } exit(0); } }
In reply to Re: Array size issue
by blue_cowdawg
in thread Array size issue
by hmb104
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |