Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: map BLOCK evaluation context

by ikegami (Pope)
on Mar 09, 2013 at 18:43 UTC ( #1022604=note: print w/ replies, xml ) Need Help??


in reply to Re: map BLOCK evaluation context
in thread map BLOCK evaluation context

The or operator always returns a scalar.

No, only the LHS operand is evaluated in scalar context. The RHS inherits.

>perl -E"@a=qw( a b c ); say( 0 or @a );" abc


Comment on Re^2: map BLOCK evaluation context
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-07-29 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls