for (@rows) { my @new = @{$rows[$_]}; # $new[0] should be equal to $rows[0][0] }