saranperl has asked for the wisdom of the Perl Monks concerning the following question:

what is difference between array and list?

Replies are listed 'Best First'.
Re: array and list
by Utilitarian (Vicar) on Aug 04, 2009 at 10:52 UTC
    Hi saranperl,

    You appear to be taking on a lot of learning at once, not a bad thing, but it can be frustrating ;)

    Try the following: Data: Arrays come back to us if there are elements of this you don't understand

    In essence an array is a variable and a list is a literal, but read the documentation for greater detail and genuine understanding, you need to gain genuine understanding of the basics to progress your learning

    Update:Added shortcut to online documentation

Re: array and list
by Anonymous Monk on Aug 04, 2009 at 10:31 UTC
Re: array and list
by ikegami (Patriarch) on Aug 04, 2009 at 19:56 UTC

    An array is a variable that can hold a variable number of scalars.

    List can refer to many things.

    • A list is values on the stack.
    • A series of comma delimited items is also known as a list literal.
    • Named operators (i.e. those in perlfunc) are also called list operators in the documentation.
    • The comma operator is actually called the list operator internally.