in reply to output of array into data

your text editor is set to use 4 columns for tabs. you will have to use spaces instead. printf is one way:
my @data = ( [qw( Count 0 0 0 0 3 0 )], [qw( Percent 0 0 0 0 75 0 )] ); my @headers = qw(Range 10-20 20-30 30-40 41-50 51-60 61-70); printf "%-10s %7s %7s %7s %7s %7s %7s\n", @headers; foreach my $values ( @data ) { printf "%-10s %7d %7d %7d %7d %7d %7d\n", @$values; }
produces:
Range        10-20   20-30   30-40   41-50   51-60   61-70
Count            0       0       0       0       3       0
Percent          0       0       0       0      75       0