This works:
$ perl -wle 'my @a = 2; print @a' 2 $ perl -wle 'my @a = scalar 2; print @a' 2 $ perl -wle 'my @a = 2+2; print @a' 4
So we can see that you can assign a scalar to an array, and it does what you mean - it creates an array with one item.
But why can't you do it with the result of @array ||(1, 2, 3)?
In reply to Re^2: ||= oddity
by moritz
in thread ||= oddity
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |