What I'm not seeing is why you would think that $c or $e could have a name better than undef.
... works just fine, produces no warnings, and has the added advantage of immediately giving the parameter a name that makes it absolutely clear that the value will be discarded.sub foo1 { my (undef, $d, undef, $f) = @_; return $d * $f; }
In reply to Re^5: Warnings on unused variables?
by AZed
in thread Warnings on unused variables?
by AZed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |