Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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??


in reply to Context aware functions - best practices?

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.

But for most cases I would stick to plain ol' wantarray()

-Lee

"To be civilized is to deny one's nature."
  • Comment on Re: Context aware functions - best practices?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://227027]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2016-09-27 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (516 votes). Check out past polls.