Re: Difference between list and arrays.

2014-09-16 Thread Paul Johnson
On Tue, Sep 16, 2014 at 02:43:28PM -0500, Andy Bach wrote: > On Tue, Sep 16, 2014 at 1:45 PM, Paul Johnson wrote: > > > The comma operator evaluates its LHS, throws it away, evaluates its RHS > > and returns that. The comma operator is left associative (see perlop). > > > > So the result of eval

Re: Difference between list and arrays.

2014-09-16 Thread Andy Bach
On Tue, Sep 16, 2014 at 1:45 PM, Paul Johnson wrote: > The comma operator evaluates its LHS, throws it away, evaluates its RHS > and returns that. The comma operator is left associative (see perlop). > > So the result of evaluating the RHS (1, 2, 3) is: > > (1, 2, 3) -> ((1, 2), 3) -> (2, 3) -

Re: Difference between list and arrays.

2014-09-16 Thread Paul Johnson
On Tue, Sep 16, 2014 at 12:12:05PM -0500, Andy Bach wrote: >The other thing to think > about is "context" - the LHS of the assigning "=" determines how the RHS > list is treated. So far, so good. Well, almost ... > In scalar c

Re: Difference between list and arrays.

2014-09-16 Thread Andy Bach
On Tue, Sep 16, 2014 at 4:22 AM, Uday Vernekar wrote: > Confusion on array and list. can anybody explain me the difference between > list and arrays. > > my @xyz = ( 4, 5, 6 ); > > The right-hand side of the equals sign is a list.here I assign that list > to the variable

Difference between list and arrays.

2014-09-16 Thread Uday Vernekar
Confusion on array and list. can anybody explain me the difference between list and arrays. my @xyz = ( 4, 5, 6 ); The right-hand side of the equals sign is a list.here I assign that list to the variable @xyz. its an array,list can be assigned to an array. on similiar lines we can assign Lists