Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Using & in function calls

by Joost (Canon)
on Oct 02, 2007 at 21:12 UTC ( #642248=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using & in function calls
in thread Using & in function calls

Well, yes.

But, it can be useful to have the called subroutine determine the next call instead of moving the determining code to the calling routine. And doing that "naively" will lead you running out of call stack if you have enough nested calls.

I've used the goto &subroutine; construct to get out of that situation.

I acknowledge that this isn't strictly tail recursion.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://642248]
help
Chatterbox?
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-07-17 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (374 votes). Check out past polls.

    Notices?