In real life, I sometimes need to call a recursive function or subroutine to process a tree-like structure. It gets called only once, at a specific point, and should (IMO) not need to be graced with a name or bound to a coderef (much in the spirit of a map {...} @somearray).
Any thoughts ? TIA.

Unless it's been fixed recently, declaring anonymous recursive subs (without using Devel::Caller or the like) is leaky, so if you're declaring a lot of them (and hoping they get destroyed when they go out of scope) you can fix that with Scalar::Util::weaken:

The J language has something like that, a magical operator called $: which always refers to the innermost verb it is used at.

However, I don't like that, and don't think it would be a good idea for perl. I'd rather like something like (one form of) the let macro in scheme. The equivalent to this would be something like this in perl: the hypothetical let NAME { BODY } ARGS could be equivalent to do { my sub NAME { BODY }; NAME(ARGS); }, where you can call NAME in the BODY too. Except we'd need a different name instead of let.

Update: redo wouldn't help. That only works if you have tail recursion. Redo doesn't return.

Why make life more difficult for yourself when you don't have to? You could theoretically do this without using a sub at all - any recursive function can be rewritten linearly using a stack - but I don't see you looking into that option, probably because it would be add complexity. You should follow the same reasoning when choosing whether or not to implement anonymous subs.