my @headings = map { "Head$_" } (1..5); my @names = qw( one two three un deux trois eins zwei drei uno dos tres een twee drie ); #### Head1onetwothreeHead2undeuxtroisHead3einszweidrei ... #### use strict; # please my @headings = map { "Head$_" } (1..5); my @names = ( [qw(one two three)], [qw(un deux trois)], [qw(eins zwei drei)], [qw(uno dos tres)], [qw(een twee drie)], ); # horizontal for (0..$#headings) { print "$headings[$_]: "; print join(', ',@{$names[$_]}),"\n"; } # vertical printf("%10s %10s %10s\n",@headings); printf("%10s %10s %10s\n",@$_) for @names;