in reply to Confused about $self in Tie::Hash

The arrow is optional after a hash key or array index, it is mandatory only after the scalar containing a reference. Thus,
$h_ref->{key}; $a_ref->[1]; $h_ref->{key}{deeper}; $h_ref->{key}[2]; $a_ref->[0][1]; $a_ref->[1]{inside}; $arr[0][1]; $hash{key}{deeper};
are all OK.

Replies are listed 'Best First'.
Re^2: Confused about $self in Tie::Hash
by LanX (Saint) on Oct 12, 2011 at 15:55 UTC
    Argh, thanks you're right.

    ( I stopped looking at $_[0] as an array element of @_. )

    Cheers Rolf