in reply to Re^2: Can't call method "abs" on an undefined value.
in thread Can't call method "abs" on an undefined value.
In this case, the warnings are wrong. Those variables *are* used more than once, but List::Util sets them in a fashion that Perl can't detect at compile-time. (Something like *{caller() . '::a' = ...;.) You can get rid of the warnings by including the following in your package:
$a = $a; $b = $b;
Ignore the warnings when trying to find your error, they are misleading you. (But do change the variable name in my $a = ...; to something else!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can't call method "abs" on an undefined value.
by HollyKing (Pilgrim) on May 05, 2006 at 23:49 UTC |