On 03/21/2012 11:27 PM, Chris Stinemetz wrote:
I would like to count the number of regex match and then move onto the
next iteration in the loop, I'm not able to get this program to work
as intended.
$count = @{ [ $string =~ /(.*)/ ] };
my $cell;
my $count = 0;
my $link;
my @linkCount;
print $file,"\n";
while (my $line =<>) {
if ($line =~ /HCS\s(\d+)/) {
$cell = $1;
if ($line =~ /DL_UPLINK_AVG_THRUPUT,\s\d+/) {
$count++;
next;
}
push(@linkCount,$count);
}
}
--
Regards
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/