Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Differ. array and List

by Fletch (Chancellor)
on Apr 26, 2005 at 01:53 UTC ( #451404=note: print w/replies, xml ) Need Help??

in reply to Differ. array and List

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://451404]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2021-04-11 10:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found