In the following Perl code, I would expect to be referencing an array reference inside an array
#!/usr/bin/perl use strict; use warnings; my @a=([1,2],[3,4]);
This stuff is tricky.
@$a[0] is parsed as (@$a)[0], dereferencing the (undefined) scalar $a
@$a[0]
(@$a)[0]
$a
You wanted to say @{$a[0]}.
@{$a[0]}