I think the main point here is that in Perl, an variable like: @array is very different than a C, Basic, Fortran or what ever array. The Perl list is very much like a linked list, but not quite. My analogy wasn't great. I don't know of a language that has a thing like a Perl list. You can push things onto the end of a Perl list, pop things from the bottom (like LIFO queue), even do the same things at the "top" of the list - hey that's what the common "shift" does!. Also it is possible to insert things in the middle, take things out of the middle. None of of those things are possible with a traditional simple "array", but are common with linked lists in C. A Perl list has all these properties and it can be sorted easily! Whoa!

In Perl I would call an "array" of lists, a List of Lists, (LoL). This is a list of references to other lists.

In C the most flexible representation of a 2-d numeric matrix is an array of pointer to arrays of ints. In Perl this is just a LoL, List of List.

Since a Perl list has fundamentally different properties from a traditional "array" in other languages, I see no reason not to call this a "list".


In reply to Re^7: Perl vs C by Marshall
in thread Perl vs C by santhosh_89

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.