Yary has asked for the wisdom of the Perl Monks concerning the following question:
perl -E 'sub f{say $_[0] unless $_[0] % 10000;exit if $_[0] > 30000;f( +$_[0]+1)};f(1)'
on perl 5.12 and 5.20, on windows and NetBSD, they both run (and without apparent limit, if you remove the "exit")
I got bit when debugging a recursive sub, and my perl process hard-froze my Windows 7 machine. The mouse moved but nothing else worked, not ctrl-alt-del, not "Fn-Sleep". I waited about 10 minutes, thinking it would run out of memory and exit, but the machine just stayed frozen :-(
Just curious if there was a recursion limit, and if so, when was it lifted?
Next day addendum - Thanks for all the replies! I've encountered the runtime warning, and the regexp recursion limit, and the debugger warnings all in the past, and I must have confabulated them. You all got ++ votes from me for your reminders.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: No recursion depth limit?
by Athanasius (Archbishop) on Sep 02, 2015 at 03:29 UTC | |
|
Re: No recursion depth limit?
by kcott (Archbishop) on Sep 02, 2015 at 03:31 UTC | |
|
Re: No recursion depth limit?
by Anonymous Monk on Sep 02, 2015 at 03:02 UTC | |
|
Re: No recursion depth limit?
by stevieb (Canon) on Sep 02, 2015 at 13:45 UTC | |
|
Re: No recursion depth limit?
by jf1 (Beadle) on Sep 10, 2015 at 15:06 UTC | |
by Your Mother (Archbishop) on Sep 10, 2015 at 15:21 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |