Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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()) { }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608295]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2016-12-03 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (59 votes). Check out past polls.