in reply to Group array in threes

If all you care about is printing:
my @array = qw(1 1 0 2 0 1 3 0 0 4 1 1); my $i = 1; for (@array) { print; print $i++ % 3 ? "," : "\n" } print "\n";