Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re(2) (crazyinsomniac): What is the difference between a list and an array?

by dmmiller2k (Chaplain)
on Dec 12, 2001 at 00:38 UTC ( [id://131039]=note: print w/replies, xml ) Need Help??


in reply to (crazyinsomniac) Re: What is the difference between a list and an array?
in thread What is the difference between a list and an array?

A list is, well, just that, a list, a bunch of values separated by commas.

You may be failing to address the confusion between what a list is with its literal representation in a program. After all a "bunch of values separated by commas" is considered a list literal, where the commas are mere notational conveniences. To the program itself, a list is a series of values, nevermind how they got there.

This is NOT a flame! It goes more to highlighting the difference between what a thing is (e.g., list), and what you have to write in a program to get one.

This particular distinction (or more precisely, the failure to understand it) caused more problems for me early on than maybe anything else (one exception: learning that my means local--in the C/C++ sense of the word--and that local really means localized global, or having a temporary local value for one But I digress).

Fortunately for me, Perl's forgiving nature (combined with its uncanny "do what I mean" quality) saved my skin more than once. But when I later went back to examine some of my old code, I could see evidence of my then-incomplete understanding of these concepts.

dmm

You can give a man a fish and feed him for a day ...
Or, you can
teach him to fish and feed him for a lifetime

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found