in reply to Hash of Hash of Array Syntax help
@{ $genes{$r[0]}{$r[1]}{$r[2]} }
is short for
@{ $genes{$r[0]}->{$r[1]}->{$r[2]} }
which is equivalent to
@{ ${ ${ $genes{$r[0]} }{$r[1]} }{$r[2]} }
There are two notations for dereferencing.
The embedded* notation (${ $array }[4]) can be used to dereference anything that can be deferenced, but it's a bit clunky.
The arrow notation ($array->[4]) is cleaner, but it can only be used for some forms of dereferencing.
There's no arrow equivalent for @{ $array }, so using push @{ ... }, $r[3] was necessary.
* — I just made up that name. I don't know of any existing name for it.
|
|---|