I like choroba's answer, it's exactly the way it works. On a theoretical note:
* List/Array assignment: @list=('el1','el2','el3');
(Note, the parenthesis indicate that a regular array initialisation is being carried out.)
* Array Reference Assignment: $aref=['el1','el2','el3']
(Note, the scalar variable $aref is being assigned a reference to a list, enclosed in square brackets).
Enjoy!
In reply to Re: difference between @, $
by sumeetgrover
in thread difference between @, $
by soubalaji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |