in reply to Re^2: Use of uninitialized value
in thread Use of uninitialized value
The first time you execute the loop, $numerator or $denominator may get initialized, but never both. Therefore you get the error message Use of uninitialized value in numeric gt (>) at New_program.pl line 535.my $numerator; my $denominator; if ($indicator eq "SH") { $numerator = $last_element; } elsif ($indicator eq "SL"){ $denominator = $last_element; } else { ... } if (($numerator > 0) && ($denominator > 0)){ ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Use of uninitialized value
by Anonymous Monk on Nov 23, 2010 at 11:39 UTC | |
by marto (Cardinal) on Nov 23, 2010 at 11:49 UTC | |
by Anonymous Monk on Nov 23, 2010 at 11:59 UTC | |
by Boldra (Curate) on Nov 23, 2010 at 14:58 UTC | |
by Ratazong (Monsignor) on Nov 23, 2010 at 13:22 UTC |