Every line that has $1 on it has an uninitialized value, and it's not $1. This isn't your real program though; this doesn't get past use strict since you haven't declared the variables, and you've got a couple of syntax errors. Perhaps your test program was supposed to be:
use strict;
use warnings;
$_ = "ArraySize 4285";
my $luns_per_array = 10;
my $logical_size; # useless variable?
if ( /^ArraySize (.+)/ )
{
print "\nArray: " . $1 . " yields a LUN of " . int($1/$luns_per_ar
+ray) . "GB\n" ;
$logical_size = int($1/2);
if ( ( $logical_size * $luns_per_array ) == $1 )
{
{$logical_size--;}
}
}
|