#!/usr/bin/perl -w use strict; $\ = "\n"; foreach my $row ( 1 .. 10 ) { my @output; foreach my $column ( 1 .. 10 ) { push @output , $column; } print join ',' , @output; } # print column totals here