Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Conditional array initialisation?

by BrowserUk (Pope)
on Jul 12, 2013 at 19:23 UTC ( #1044056=note: print w/ replies, xml ) Need Help??

in reply to Re: Conditinal array initialisation?
in thread Conditional array initialisation?

That it doesn't work is clear.

But, the semantics seem very clear, and the implementation trivial (roughly, without the need for copying):

undef @a; @a = @a ? @a : (1..3); say @a;; 1 2 3 @a = (4..6); @a = @a ? @a : (1..3); say @a;; 4 5 6

So I wondered why it isn't implemented so?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Comment on Re^2: Conditional array initialisation?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2015-10-07 12:28 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (184 votes), past polls