in reply to Question about returning array from sub
@rot_mat is an array of array references, that's why you see three fields in the output from your print statement. If you wanted to print all values of $rot_mat[0] then you would need to do
print @{$rot_mat[0]};or just use Data::Dumper on \@rot_mat to get the full tree. See perldsc for more on these nested structures and the section "Access and Printing of an ARRAY OF ARRAYS" for this particular question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question about returning array from sub
by ojagan (Novice) on Jul 10, 2015 at 12:48 UTC | |
by QM (Parson) on Jul 10, 2015 at 13:00 UTC |