Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Conditional array initialisation?

by abualiga (Scribe)
on Jul 13, 2013 at 01:01 UTC ( #1044103=note: print w/replies, xml ) Need Help??


in reply to Conditional array initialisation?

I just started reading the Perl Cookbook, and came across a similar example (chapter1 Strings, p12), only with ||= as //= was not implemented at the time of publication. It says don't extend the use of the ||= assignment operator to arrays and hashes, because the operators put the left operand into scalar context. Instead use the ternary operator, like you did later.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044103]
help
Chatterbox?
[marioroy]: Yes, will do for PM. I love PM.
Lady_Aleena ponders a meditation of her own, but it would be on a far far less important topic.
[marioroy]: I'm hoping to have a release in about a week's time.
Discipulus supermario..
marioroy MCE isn't important by any means. Just wanted to complete this task. Hobo needed more love and MCE::Shared as well. It wasn't easy at all.
[marioroy]: Discipulus No supermario. I'm a humbled person within. Just wanted to complete this journey.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2017-05-26 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?