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: Jeff Schaller <schaller@xxxxxxxxxxxxx>
Date: Fri, 20 Oct 2000 10:26:43 -0500 (CDT)
Reply-to: discussion@xxxxxxxxx

On Fri, 20 Oct 2000, Steven Saner wrote:

> For your purpose I would suggest:  printf "%7.2s"
> 
> That way you force two digits of precision to the right of the decimal point.

Except that the ".2" only means "digits after decimal point" for
numbers :) For strings, I had to look it up: "max length for
string"; so doing: printf "%7.2s", 5.77; you get "5.".

Isn't there a perl list around here somewhere?

-jeff
-- 
We are Linux. Resistance is an indication that you missed the point.


-- 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]