P is for Practical | |
PerlMonks |
Re: Spot the bug!by Anonymous Monk |
on Oct 26, 2006 at 07:13 UTC ( [id://580696]=note: print w/replies, xml ) | Need Help?? |
Red herrings, and a wrong conclusion. It has nothing to do with either @_, or eval. It all has to do with Perl using pass by alias.
$_[0] is just a different name for $n, which is being modified in foo, just like your function uses eval, which sets $@.
In Section
Meditations
|
|