|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Context aware functions - best practices?by shotgunefx (Parson) |
| on Jan 15, 2003 at 01:50 UTC ( #227027=note: print w/ replies, xml ) | Need Help?? |
|
I see nothing wrong with this idiom. It's how I would do it, but if you were worried about generating the extra data (Which in this case your not) I would recommend looking at Want. "wantarray on steriods". In this example you could use the howmany() sub to determine how many items the caller wants.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||