Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: "Commifying" a number

by BrowserUk (Patriarch)
on Dec 12, 2002 at 19:27 UTC ( [id://219401]=note: print w/replies, xml ) Need Help??


in reply to Re: "Commifying" a number
in thread "Commifying" a number

Ahem:). This doesn't appear work correctly on numbers with decimal places?


Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Replies are listed 'Best First'.
Re: Re: Re: "Commifying" a number
by sauoq (Abbot) on Dec 13, 2002 at 00:49 UTC

    sauoq sighs.

    True. It only works on integers. I should have said so.

    How about this...

    s/(\d+)/$_=$1;1while(s|(?<!\b)(\d{3})(?:\b)|,$1|);$_/e

    :-P

    -sauoq
    "My two cents aren't worth a dime.";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found