The @ and % sigils indicate you want a list and not a scalar.
If you use an array directly then you get a warning. I'm not sure why it does not appear for array derefs.
perl -E"use warnings; my @array = (1..3); print @array[2];" Scalar value @array[2] better written as $array[2] at -e line 1.
In reply to Re: dereferencing question
by swl
in thread dereferencing question
by sectokia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |