Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Print a number with grouping in a European style

by integral (Hermit)
on Feb 08, 2003 at 19:33 UTC ( #233760=note: print w/ replies, xml ) Need Help??


in reply to Re: Print a number with grouping in a European style
in thread Print a number with grouping in a European style

I could have, but at the time I didn't actually think to look up the perl faq. But now I have, I notice that my algorithm is basically the same as the routine from Andrew Johnson, just with modifications to use map instead of a s///, to convert the radix point to a comma. Plus this has been turned into a one-liner (with only one statement), which while the examples in perlfaq could easily be turned into one-liners, they all require temporary variables, which I like to avoid (for no good reason).

--
integral, resident of freenode's #perl


Comment on Re: Re: Print a number with grouping in a European style

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-07-06 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls