Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have the following snippet of code:
It produces:sub PRINT { printf("\n\t\t%-10s %-10s %-10s\n",'UAS','LCV','DM'); while(@UAS || @LCV || @DM) { printf("\t\t%-10s %-10s %-10s\n", shift(@UAS) || '', shift(@LCV) || '', shift(@DM) || '', ); } }
How can I easily align the value column for each of the UAS, LCV, and DM?UAS LCV DM 8 0 8 0 8 0 9 0 9 0 9 0 10 0 10 0 10 0 11 0 11 0 11 0 12 86400 12 0 12 0 13 0 13 0 13 0 14 0 14 0 14 0 15 0 15 0 15 0
The left and right values are concatenated together in a previous step.UAS LCV DM 8 0 8 0 8 0 9 0 9 0 9 0 10 0 10 0 10 0 11 0 11 0 11 0 12 86400 12 0 12 0 13 0 13 0 13 0 14 0 14 0 14 0 15 0 15 0 15 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing format
by Hofmator (Curate) on Feb 08, 2003 at 16:58 UTC | |
|
Re: Printing format
by cees (Curate) on Feb 08, 2003 at 15:20 UTC | |
|
Re: Printing format
by Anonymous Monk on Feb 08, 2003 at 18:34 UTC | |
|
Re: Printing format
by Enlil (Parson) on Feb 08, 2003 at 15:50 UTC |