Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Differ. array and List

by Fletch (Bishop)
on Apr 26, 2005 at 01:53 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-24 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found