in reply to Formating a printf statement using a variable
I just love this place. I had a simliar issue and bam here is the answer on the search.
A differnt version of the question involved displaying columnized data.
If a word was larger then a certain size then I needed differnt columns and a print size. Using the offered method:
use strict; use warnings; my $fmt = "%-$print_size" . "s"; printf("$fmt","$_");
Thanks again and though it is late ++all
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Formating a printf statement using a variable
by Aristotle (Chancellor) on Jan 11, 2003 at 17:59 UTC | |
by Marza (Vicar) on Jan 12, 2003 at 00:06 UTC | |
by Aristotle (Chancellor) on Jan 12, 2003 at 00:19 UTC |