Complete.Org: Mailing Lists: Archives: discussion: October 2000:
[aclug-L] Re: Formatting numbers in Perl!
Home

[aclug-L] Re: Formatting numbers in Perl!

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: discussion@xxxxxxxxx
Subject: [aclug-L] Re: Formatting numbers in Perl!
From: Mohammad Islam <sohel@xxxxxxxxxxxxx>
Date: Fri, 20 Oct 2000 01:55:29 -0500
Reply-to: discussion@xxxxxxxxx

Steven Saner wrote:
> 
> You can use the sprintf, which is the same as printf except that it
> will print to a string. So something like:
> 
> $sub_total = sprintf "%.2d", $price * $quantity;
> 
Thanks. Yea i have found some info about sprintf and alreaduy using it.
Now how about left or right justifying? Say I have the following..

99.99 124.50 6780.98

I want them to line up like this:

  99.99
 124.50
6780.98

Can i do this with sprintf?

Thanks.

Moe

-- This is the discussion@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]