# print for (my $i =1; $i <= $#arr; $i++) { # ^ missing print join(',', @{$arr[$i]})."\n"; # ^ ^ missing }