No such thing as a small change | |
PerlMonks |
Re^3: why is $1 cleared at end of an inline sub? (semantics anonymous vs named subs)by LanX (Saint) |
on Sep 17, 2021 at 21:34 UTC ( [id://11136852]=note: print w/replies, xml ) | Need Help?? |
"normal subs" are just named "anonymous subs", there is not much more difference. consider
this also works the other way round, you can read the sub-ref of a named sub and than destroy the name in the packages STASH:
So where do you want to draw the line???
side-notethere are though block-compounds in Perl which can be confused with anonymous subs. Maybe that's your misunderstanding, if you talk about "inlined subs" °? for instance map-blocks are not ano-subs effecting return
But those map-like constructs in List::Util are implemented with ano-subs and won't allow returning from outer subs!
Cheers Rolf °) what does that even mean?
In Section
Seekers of Perl Wisdom
|
|