Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by GrandFather (Sage)
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-07-29 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (260 votes). Check out past polls.