GS has asked for the wisdom of the Perl Monks concerning the following question:

Monks,
How to make ptintf function to print the string from left instead of right.
for example the command below display from the right most column, I need from left:
printf "%30sTesting"
Thanks for help. -------------------------- Thanks a lot, I did not know about perldoc. Please be patient as I am new to perl.

Replies are listed 'Best First'.
Re: printf question
by valdez (Monsignor) on Jun 27, 2004 at 16:18 UTC

    printf "%-30sTesting", $value; Please refer to perldoc -f sprintf for more explanations.

    Ciao, Valerio

Re: printf question
by Joost (Canon) on Jun 27, 2004 at 16:17 UTC