On Jan 22, 2008 8:45 PM, bootleg86 bootleg86 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I came across this construct
> foreach $i ( @{$y} ) {
>   #do something
> }
>
> Is @ referring to some default array that doesn't need to be declared?
>
> Also it's using the associative version of an array?
> I always thought only hashes were associative.
snip

If the code works (and it isn't guarenteed to), then $y holds a
reference to an array and @{} is being used to corerce it into
behaving like an array (i.e. dereferencing it).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to