my $col_width = ( sort { $b <=> $a } map { length } ( #sort lengths (keys %lists, map { @$_ } values %lists) ) )[0] + 2; #2 is the padding