Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Context aware functions - best practices?by LAI (Hermit) |
on Jan 14, 2003 at 18:46 UTC ( [id://226921]=note: print w/replies, xml ) | Need Help?? |
Hm. My first reaction is to consider the possibility of:
This should of course be a scalar result, and not equal to scalar (@x = foo(1,2,3,5)). I'd feel uncomfortable omitting the results from the 2,3 and 5, so I'd probably do one of the following:
depending on use, 'yadda'x3. Perhaps, if it really suits the particular sub, you might want to return a join, but I'd personally be leery of that. LAI :eof
In Section
Seekers of Perl Wisdom
|
|