Examples: $count = scalar(@matrix); $count = @matrix; # scalar() is optional since we're assigning to a scalar. $count = $#matrix + 1; $first_row = $matrix[0]; # this is a reference, rememeber.. @first_row = @$first_row; # dereference it. @first_row = @{$first_row}; # dereference it. @first_row = @{$matrix[0]}; # dereference it. $count_of_first_row = scalar(@first_row); # scalar() is optional here. $count_of_first_row = scalar(@{$matrix[0]}); # scalar() is optional here. $first_field_of_second_row = $matrix[1][0]; $first_field_of_second_row = $matrix[1]->[0]; # this is what you are really doing.