subcall( \@{$M[0]} );
Which passes a reference to the first array in @M.
So it does, but if the array @M is initialized per something like
my @M = (\@a1, \@a2, \@a3);
then the elements of @M are all array references to begin with, so why not just
subcall($M[0]);
and avoid taking a reference to a de-referenced array reference?
(And see also perllol "Manipulating Arrays of Arrays in Perl".) (Update: And also perlreftut.)
In reply to Re^2: Arrays in arrays, how to access them
by AnomalousMonk
in thread Arrays in arrays, how to access them
by viored
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |