use strict; identifies your error. Your getting the index of the last element in the array referenced by $array_ref, but $array_ref doesn't exist.
use strict; use warnings; my @array1 = qw(one two three four five); my @array2 = qw(blue green white orange black); my @array3 = qw(car bike plane ship); my @array_of_refs = (\@array1, \@array2, \@array3); print $#array_of_refs; # 2 print $#{ $array_of_refs[2] }; # 3 = $#array3
In reply to Re: Dereferencing an array of arrays
by ikegami
in thread Dereferencing an array of arrays
by smist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |