Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Why are "a ||= b" and "a = a || b" different?

by Anonymous Monk
on Mar 05, 2007 at 10:07 UTC ( [id://603185]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why are "a ||= b" and "a = a || b" different?
in thread Why are "a ||= b" and "a = a || b" different?

void is false
my $w = wantarray; $w = defined $w ? ($w ? 'list' : 'scalar') : 'void'; carp "wantarray : $w ";

Replies are listed 'Best First'.
Re^4: Why are "a ||= b" and "a = a || b" different?
by diotalevi (Canon) on Mar 05, 2007 at 15:48 UTC

    Why copy the value of wantarray into a temporary? You're just adding visual and other overhead.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found