$ perl -E 'sub w { say wantarray ? "list" : "item" }; @a[0] = w(); $a[ +0] = w()' list item
(Update: slightly clearer code)
In reply to Re: What is the difference between $array[1] and @array[1]?
by moritz
in thread What is the difference between $array[1] and @array[1]?
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |