Instead of the previously suggested formats, you might want to consider (s)printf.
In reply to Re: Pretty text reports with perl by JavaFan in thread Pretty text reports with perl by tsk1979