use Data::ShowTable; my @AoA = ( [ qw/id user_lvl first_name last_name surname homepage/ ], [ '1', '50', 'unknownlengh', '', ' ', 'none' ], [ qw/5000 0 Joe Papadakolopolous AlsoTooLong www.younameit.org/ ], ); my $header = shift @AoA; # extract the column labels to a separate array # You can set "default" column widths to be the lengths of # the column header strings, like this: my @colwidth = map { length() } @$header; # If you don't do at least that much work to initialize # column widths, you probably won't like the output. # figure out the maximum data widths for each column; these will have an # effect on output when they happen to be wider than the corresponding # column header string: my @colwidth; for $row ( @AoA ) { for ( $col=0; $col<@$row; $col++ ) { my $l = length( $$row[$col] ); $colwidth[$col] = $l if ( $colwidth[$col] < $l ); } } # Note that the args this and other ShowTable methods are all REFERENCES: ShowBoxTable $header, [qw/int int text text text text/], \@colwidth, \&rowsub; # Here's the sub that ShowTable needs so that it can fetch # one row of data per call: sub rowsub { my $arg = shift; if ( $arg ) { return; } elsif ( scalar @AoA ) { my $rowref = shift @AoA; return (@$rowref); } else { return; } }