Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: Short circut operators in list context

by Anarion (Hermit)
on Dec 01, 2003 at 00:18 UTC ( [id://311142]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Short circut operators in list context
in thread Short circut operators in list context

my @c = @a or @b;
That's not the same, the asignment has more precedence than the or.

And Deparse tells that the only difference between "or" and "||" are two parents:
perl -MO=Deparse,-p -e 'my @d = (@a or @b);' (my(@d) = (@a || @b)); -e syntax OK
and it's evaluated in scalar context.

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2025-07-20 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.