jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
Is this the correct way to use printf ?$a = 10 ; $b = 123456 ; printf "%${a}d", $b ; # instead of printf "%10d", $b ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printf with variable display width
by QM (Parson) on Jun 14, 2006 at 16:28 UTC | |
|
Re: printf with variable display width
by ikegami (Patriarch) on Jun 14, 2006 at 16:43 UTC | |
|
Re: printf with variable display width
by lukeyboy1 (Beadle) on Jun 14, 2006 at 16:24 UTC | |
|
Re: printf with variable display width
by dsheroh (Monsignor) on Jun 14, 2006 at 16:27 UTC |