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.