On Mon, 2006-10-04 at 08:12 -0500, Mike Blezien wrote:
> Hello,
> 
> we're working on generating customer invoices using a text file as a 
> template, 
> then inserting the various invoice data(see below - Current View & Desired 
> View). I've been trying to come up with a solution to maintain the dollar 
> amounts column inline with each other, but as each line is slightly different 
> in 
> lenght, it's hard to maintain the amount columns inline with each other. 
> We've 
> tried variations format controls within the template, but when we insert the 
> data into the template dynamically, the format isn't maintained. Is there a 
> workable solution of doing this ?

Yes. The easiest way is to use formats. See `perldoc perlform` for
details. You could also use printf (see `perldoc -f sprintf` and
`perldoc -f printf`) and Text::Wrap (see `perldoc Text::Wrap`).


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to