in reply to Re^3: Sorting, recursion, and tail-call optimizations
in thread Sorting, recursion, and tail-call optimizations
Now here is where it gets interesting, if I include $a and $b in the print statement I discover that in the first call both variables are set to two different array refs (as expected). On the second call (the one that blows up), neither variable is defined???
sub my_sort { print "hello there $a $b\n"; my $i = $_[0] || 0; ... } __END__ hello there ARRAY(0x1868244) ARRAY(0x1868298) Use of uninitialized value in concatenation (.) or string at ... Use of uninitialized value in concatenation (.) or string at ... hello there *** BOOOOM ***
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Sorting, recursion, and tail-call optimizations
by BrowserUk (Patriarch) on Jan 06, 2006 at 17:47 UTC | |
by Limbic~Region (Chancellor) on Jan 06, 2006 at 18:00 UTC | |
by BrowserUk (Patriarch) on Jan 06, 2006 at 18:33 UTC | |
by Limbic~Region (Chancellor) on Jan 06, 2006 at 18:45 UTC | |
by BrowserUk (Patriarch) on Jan 06, 2006 at 19:07 UTC | |
| |
|
Re^5: Sorting, recursion, and tail-call optimizations
by kwaping (Priest) on Jan 06, 2006 at 18:29 UTC | |
by Limbic~Region (Chancellor) on Jan 06, 2006 at 18:34 UTC | |
by kwaping (Priest) on Jan 06, 2006 at 18:36 UTC |