in reply to Re^5: Sorting, recursion, and tail-call optimizations
in thread Sorting, recursion, and tail-call optimizations

kwaping,
You can see in the code that I am not using any prototypes. Additionally, it would be really wacky if when sort called it the first time it didn't see it as a prototyped sub (used $a and $b) but when it got recursed the first time it did (using references in @_). I know this is not the case because I printed the values of @_ and they are correct. It is the undefined $a and $b and the mysterious blowing up that has me baffled.

Cheers - L~R

  • Comment on Re^6: Sorting, recursion, and tail-call optimizations

Replies are listed 'Best First'.
Re^7: Sorting, recursion, and tail-call optimizations
by kwaping (Priest) on Jan 06, 2006 at 18:36 UTC
    I know you're not implicitly prototyping the sub, just wondering if maybe there was some mysterious under-the-hood process that was applying one. But then, I (obviously?) have no idea about any of what I've posted in this thread. :)