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!)
In reply to Re^3: Can't call method "abs" on an undefined value.
by ikegami
in thread Can't call method "abs" on an undefined value.
by HollyKing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |