You can do this a lot easier and shorter:
(Okay, you'd have to include some check for eof so it won't get into an endless loop if the input is too short. But I won't change it because it's so nice and short :)open my $tailf, "tail -f $logFile |" or die; for (1,2) { my $line = ''; $line = <$tailf> until $line =~ / on $ipaddress/; push @matches, $line; }
In reply to Re: Array size issue
by betterworld
in thread Array size issue
by hmb104
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |