In a message dated 12/18/2002 12:13:38 PM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


> 
> Anyway, perhaps one of you syntactical thought police could give me some
> insights to the rational.  I find it very confusing that the $ and @ 
> characters
> are supposed to be used interchangeably to denote arrays, particularyly 
> when I'm
> trying to fathom the relation to other issues such as scalar or list 
> context. 
> As I recall, hashes arso use % and @ interchangeably.


This about it like this: 
The "$" refers to a single piece of information. 
The "@" refers to a list.
The "%" refers to an unordered list. 

So, if you want to referrer to a specific part of an array, or hash, you have 
to use a $, or scalar. So if your array is 
@array = qw(something something2 something3)
Then $array[0] is a scalar value of the first element of the ordered list, 
"something". 

Reply via email to