|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Does perl sub using stack and possible to crash?by Corion (Pope) |
| on Jan 17, 2013 at 10:13 UTC ( #1013744=note: print w/ replies, xml ) | Need Help?? |
|
Global variables are global, and @_ are aliases. This is easily replicated and tested with the following code (your while loop will never terminate so I used a for loop instead):
If you I suggest to use a lexical iterator instead of $_, and don't have your callees change elements in @_. Using a lexical iterator prevents action at a distance from called subroutines. Using @_ will need more changes and information about $finder->isExist(...).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||