Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 wandering the Monastery: (5)
As of 2018-07-23 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?