Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How do I check the return value of wantarray?

by imp (Priest)
on Apr 04, 2007 at 15:09 UTC ( #608295=note: print w/ replies, xml ) Need Help??


in reply to How do I check the return value of wantarray?

Because in the first case it isn't possible to reach the branch that tests if wantarray is true, since it is an elsif after testing if it is defined.

if(defined wantarray()) { } elsif(wantarray()) { }


Comment on Re: How do I check the return value of wantarray?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-11-26 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (165 votes), past polls