Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Change decimal point temporarily

by nvivek (Vicar)
on Aug 03, 2010 at 04:51 UTC ( [id://852594]=note: print w/replies, xml ) Need Help??


in reply to Change decimal point temporarily

You can use the substitute command to do this.If you want to replace the . for only numerals.Before replacing,you can check whether that variable has numerals or not by using regular expression in substitute command as follows.

$no=123.45; $no=~s/^(\d+)\.(\d+)/$1,$2/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2025-07-10 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.