Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I've problem with aligning tabbed strings. My code looks something like this:
my $output = qq~Username\tLevel\tCreated\n~; foreach my $row (@rows) { $output .= qq~$row->[0]\t$row->[1]\t$row->[2]\n~; }
And I get something like this:
Username Level Created johnny 2 12-09-2008 rob 2 25-10-2008
Is there a way to align the value of each row correctly under each heading?
Thanks in advance :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to align tabbed strings?
by WizardOfUz (Friar) on Jan 02, 2010 at 14:54 UTC | |
by Anonymous Monk on Jan 02, 2010 at 15:54 UTC | |
|
Re: How to align tabbed strings?
by FunkyMonk (Bishop) on Jan 02, 2010 at 16:05 UTC | |
by Anonymous Monk on Jan 02, 2010 at 17:49 UTC | |
by FunkyMonk (Bishop) on Jan 02, 2010 at 17:54 UTC | |
|
Re: How to align tabbed strings?
by johngg (Canon) on Jan 02, 2010 at 16:24 UTC |