Why do all of these methods of accessing an array work?
- by bstullkid
It seems to me that some of these should fail, but they all output what they are supposed to:
$, = "\n";
%test = (
"one" => ["one_0", "one_1"],
"two" => ["two_0", "two_1"]
);
print @{$test{"one"}}[0],
@{$test{"one"}}->[0],
$test{"two"}->[0],
$test{"one"}[1];
Why is this?