Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Dollars and regex cents

by mexnix (Pilgrim)
on Sep 06, 2001 at 22:05 UTC ( [id://110675]=note: print w/replies, xml ) Need Help??


in reply to Dollars and regex cents

try sprintf:
@nums = (5.5, 9, 19.95); print sprintf("\$%.2f\n", $_) foreach @nums;

__________________________________________________

s mmgfbs nf, nfyojy m,tr yb-zya-zy,s zfzphz,print;
- thanks japhy :)

mexnix.perlmonk.org

Log In?
Username:
Password:

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

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

    No recent polls found