in reply to How to align tabbed strings?
It is good that WizardOfUz's suggestion of Text::Table is working well for you. It is also worth being familiar with printf for application to simple problems.
$ perl -e ' > $format = qq{%-10s%-7s%-12s\n}; > @headings = qw{ Username Level Created }; > printf $format, @headings; > @rows = ( > [ qw{ johnny 2 12-09-2008 } ], > [ qw{ rob 2 25-10-2008 } ], > ); > printf $format, @$_ for @rows;' Username Level Created johnny 2 12-09-2008 rob 2 25-10-2008 $
I hope this is useful.
Cheers,
JohnGG
Update: Looks like FunkyMonk beat me to it, must learn to type faster :-/
|
|---|