more useful options | |
PerlMonks |
Re: Context aware functions - best practices?by scholar (Acolyte) |
on Jan 14, 2003 at 18:35 UTC ( [id://226919]=note: print w/replies, xml ) | Need Help?? |
If I understand the question correctly you're wanting the sub to be aware of the context within which it is called which is precisely the purpose of the wantarray function. And it's perfectly clear to boot. I have to say I've always thought of it as rather elegant myself.
In Section
Seekers of Perl Wisdom
|
|