An array is an array, a list is a list.
An array is an ordered collection of values which lives in a permanent (more or less) location such as a named variable in the symbol table (e.g. $main::array or a named lexical (my @array = ( . . . )) (and yes, I'm ignoring references). A list is a temporary ordered set of values that lives on the call stack being put somewhere. An array in list context produces a list of the values it contains. An array can be used most places a LIST is expected, but not vice versa (for example push wants a literal array as its first argument).
It's a subtle distinction, but a few careful readings of perldata may eventually produce enlightenment.
In reply to Re: Differ. array and List
by Fletch
in thread Differ. array and List
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |