Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Eliminating Trailing Zeros

by demerphq (Chancellor)
on Jul 17, 2003 at 15:04 UTC ( [id://275237]=note: print w/replies, xml ) Need Help??


in reply to Eliminating Trailing Zeros

($n=sprintf "%2.4f",$n)=~s/\.?0+$//;

---
demerphq

<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://275237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-03-29 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found