|
|
| Just another Perl shrine | |
| PerlMonks |
Re: @_ & @ARGVby NetWallah (Monsignor) |
| on Oct 07, 2012 at 14:56 UTC ( #997684=note: print w/ replies, xml ) | Need Help?? |
|
The @_ parameter to a subroutine gets populated at RUN TIME (or the time the subroutine gets called), with whatever is passed to it at that time.
In tHe first call, you pass @ARGV to the 'formlist' sub. Perhaps we can explain it better if you tell us what you were expecting, and why. In case you were unaware, you created a "closure" around @list, preserving it's value.
I hope life isn't a big joke, because I don't get it.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||