How to display 1.234.567.890,00 from 1234567890 ?
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.perl.misc Profile…
 Up
How to display 1.234.567.890,00 from 1234567890 ?         


Author: Jason Stacy
Date: May 4, 2008 23:33

Given a decimal value (e.g. 1234567890) I want to print this number with
grouping delimiters (european style with dots: 1.234.567.890,00
and not US style 1,234,567,890.00)

How can I do this in perl?

Jason
2 Comments
Re: How to display 1.234.567.890,00 from 1234567890 ?         


Author: sheinrich
Date: May 5, 2008 00:30

On May 5, 8:33 am, jjst...@yahoo.net (Jason Stacy) wrote:
> Given a decimal value (e.g. 1234567890) I want to print this number with
> grouping delimiters (european style with dots: 1.234.567.890,00
> and not US style 1,234,567,890.00)
>
> How can I do this in perl?
>
> Jason

Adapt any of the methods given at
http://faq.perl.org/perlfaq5.html#How_can_I_output_my_

BTW: the comma as a decimal separator is country _and_ language
specific, and is not common across europe.
no comments
Re: How to display 1.234.567.890,00 from 1234567890 ?         


Author: Jürgen Exner
Date: May 5, 2008 06:42

jjstacy@yahoo.net (Jason Stacy) wrote:
>Given a decimal value (e.g. 1234567890) I want to print this number with
>grouping delimiters (european style with dots: 1.234.567.890,00
>and not US style 1,234,567,890.00)
>
>How can I do this in perl?

See perldoc -q added

Replacing the comma with a dot in the sub commify() is left as an
excercise to the reader.

jue
no comments