in reply to private recursive subroutines

Interesting. How would you escape from the recursive? Or, could you please give a real example of usage?

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^2: private recursive subroutines
by gaal (Parson) on May 10, 2007 at 16:03 UTC
    There's one here. Look for the comment saying "yay for recursive closures" :-)
Re^2: private recursive subroutines
by Sixtease (Friar) on May 10, 2007 at 16:04 UTC

    I don't think that showing my real-world example would have much point. I just had a very complicated subroutine where I wanted to refactor some code to a separate sub. I didn't want to pollute the package's namespace with another function name, so I used a my $coderef. And it turned out to be a good task for recursion, so here we go.