|
|
| Problems? Is your data what you think it is? | |
| PerlMonks |
Re(3): NEWBIE Brain Teaser #2, by nysusby yakko (Friar) |
| on Apr 16, 2001 at 02:33 UTC ( [id://72748]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Because @_ is localised for the subroutine. Since you called subroutine with no parms, the @_ it's operating from has undef. As for &subroutine, @_ is not localised and the existing one is passed in. $_ need not apply outside the sub in any event -- the subroutine deals with @_. --
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||