in reply to Help with references
Also, when the -> dereferencing operator is in between subscripts (as it is here, between a hash and array subscript), it is optional. So the 2nd example would usually be written as $HASH{2}[1].my @things = @{ $HASH{2} }; ## @things is now a copy of @ARRAY2 my $foo = $HASH{2}->[1]; ## $foo is now $ARRAY2[1]
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Help with references
by pg (Canon) on Oct 23, 2003 at 02:45 UTC |