bootleg86 bootleg86 wrote:
Hi,

Hello,

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.

$y is a reference to an array and @{$y} (or simply @$y) is dereferencing that array reference.

perldoc perlreftut


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

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


Reply via email to