Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Is map's sub block really being evaluated in list context? wantarray() returns undef..

by GrandFather (Cardinal)
on Oct 19, 2011 at 19:59 UTC ( #932488=note: print w/ replies, xml ) Need Help??


in reply to Is map's sub block really being evaluated in list context? wantarray() returns undef..

wantarray's documentation says it all really. wantarray is sensitive to the "subroutine or eval" context and is "unspecified in the top level of a file". map isn't a sub or eval so doesn't provide any new context for wantarray.

True laziness is hard work


Comment on Re: Is map's sub block really being evaluated in list context? wantarray() returns undef..

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-12-22 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls