in reply to Re^4: Warnings on unused variables?
in thread Warnings on unused variables?
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; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Warnings on unused variables?
by Animator (Hermit) on Oct 02, 2008 at 07:08 UTC | |
by JavaFan (Canon) on Oct 02, 2008 at 16:15 UTC | |
by AZed (Monk) on Oct 02, 2008 at 16:00 UTC |