RE: Format number

2002-01-10 Thread Alistair . McGlinchy

Cristian,

See Perl FAQ 5, How can I output my numbers with commas added?

Of course you'll need to replace the comma with a . within your code.

A combination of sprintf followed by commify should do what you want.

Perhaps you can call the sub decimal_pointify instead :-) 

HTH 

Alistair

 --
 Alistair McGlinchy,   [EMAIL PROTECTED]
 Sizing and Performance, Central IT,   ext. 5012,   ph +44 20 7268-5012
 Marks and Spencer, 3 Longwalk Rd, Stockley Park, Uxbridge UB11 1AW, UK 
 
 -Original Message-
 From: Cristian Carvajal [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, January 10, 2002 6:57 PM
 To:   [EMAIL PROTECTED]
 Subject:  Format number
 
 Desire to take a variable to scale and to give format him of numerico
  example 3145 == 3.145,00
 
 and used sprintf but does not give this format anybody me knows since I
 can
 do this
 
 
 thanks
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


---


Registered Office:
Marks  Spencer p.l.c
Michael House, Baker Street,
London, W1U 8EP
Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422 
Facsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know and 
then delete it from your system; you should not copy, disclose, or distribute its 
contents to anyone nor act in reliance on this e-mail, as this is prohibited and may 
be unlawful.

The registered office of Marks and Spencer Financial Services Limited, Marks and 
Spencer Unit Trust Management Limited, Marks and Spencer Life Assurance Limited and 
Marks and Spencer Savings and Investments Limited is Kings Meadow, Chester, CH99 9FB.

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Format number

2002-01-10 Thread Ian . Stewart

Hey Alistair,

You know if there's anyway to localize these sort of things (not just number
formats, but dates and that sort of thing as well) within Perl?


Thanx,
Ian

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 10, 2002 2:53 PM
 To: [EMAIL PROTECTED]; 
 [EMAIL PROTECTED]
 Subject: RE: Format number
 
 
 Cristian,
 
 See Perl FAQ 5, How can I output my numbers with commas added?
 
 Of course you'll need to replace the comma with a . within 
 your code.
 
 A combination of sprintf followed by commify should do what you want.
 
 Perhaps you can call the sub decimal_pointify instead :-) 
 
 HTH 
 
 Alistair
 
  
 --
  Alistair McGlinchy,   
 [EMAIL PROTECTED]
  Sizing and Performance, Central IT,   ext. 5012,   ph +44 
 20 7268-5012
  Marks and Spencer, 3 Longwalk Rd, Stockley Park, Uxbridge 
 UB11 1AW, UK 
  
  -Original Message-
  From:   Cristian Carvajal [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, January 10, 2002 6:57 PM
  To: [EMAIL PROTECTED]
  Subject:Format number
  
  Desire to take a variable to scale and to give format him 
 of numerico
   example 3145 == 3.145,00
  
  and used sprintf but does not give this format anybody me 
 knows since I
  can
  do this
  
  
  thanks
  
  ___
  Perl-Win32-Users mailing list
  [EMAIL PROTECTED]
  http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
 
 
 --
 -
 
 
 Registered Office:
 Marks  Spencer p.l.c
 Michael House, Baker Street,
 London, W1U 8EP
 Registered No. 214436 in England and Wales.
 
 Telephone (020) 7935 4422 
 Facsimile (020) 7487 2670
 
 www.marksandspencer.com
 
 Please note that electronic mail may be monitored.
 
 This e-mail is confidential. If you received it by mistake, 
 please let us know and then delete it from your system; you 
 should not copy, disclose, or distribute its contents to 
 anyone nor act in reliance on this e-mail, as this is 
 prohibited and may be unlawful.
 
 The registered office of Marks and Spencer Financial Services 
 Limited, Marks and Spencer Unit Trust Management Limited, 
 Marks and Spencer Life Assurance Limited and Marks and 
 Spencer Savings and Investments Limited is Kings Meadow, 
 Chester, CH99 9FB.
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Format number

2002-01-10 Thread Peter Eisengrein

At least on NT4, there's a Regional Settings control panel that has number
format, as well as currency, etc. So, I'm guessing, those settings must
exist in the registry somewhere.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 10, 2002 14:58
 To: [EMAIL PROTECTED]; 
 [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: RE: Format number
 
 
 Hey Alistair,
 
 You know if there's anyway to localize these sort of things 
 (not just number
 formats, but dates and that sort of thing as well) within Perl?
 
 
 Thanx,
 Ian
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 10, 2002 2:53 PM
  To: [EMAIL PROTECTED]; 
  [EMAIL PROTECTED]
  Subject: RE: Format number
  
  
  Cristian,
  
  See Perl FAQ 5, How can I output my numbers with commas added?
  
  Of course you'll need to replace the comma with a . within 
  your code.
  
  A combination of sprintf followed by commify should do what 
 you want.
  
  Perhaps you can call the sub decimal_pointify instead :-) 
  
  HTH 
  
  Alistair
  
   
  
 --
   Alistair McGlinchy,   
  [EMAIL PROTECTED]
   Sizing and Performance, Central IT,   ext. 5012,   ph +44 
  20 7268-5012
   Marks and Spencer, 3 Longwalk Rd, Stockley Park, Uxbridge 
  UB11 1AW, UK 
   
   -Original Message-
   From: Cristian Carvajal [SMTP:[EMAIL PROTECTED]]
   Sent: Thursday, January 10, 2002 6:57 PM
   To:   [EMAIL PROTECTED]
   Subject:  Format number
   
   Desire to take a variable to scale and to give format him 
  of numerico
example 3145 == 3.145,00
   
   and used sprintf but does not give this format anybody me 
  knows since I
   can
   do this
   
   
   thanks
   
   ___
   Perl-Win32-Users mailing list
   [EMAIL PROTECTED]
   http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
  
  
  --
  -
  
  
  Registered Office:
  Marks  Spencer p.l.c
  Michael House, Baker Street,
  London, W1U 8EP
  Registered No. 214436 in England and Wales.
  
  Telephone (020) 7935 4422 
  Facsimile (020) 7487 2670
  
  www.marksandspencer.com
  
  Please note that electronic mail may be monitored.
  
  This e-mail is confidential. If you received it by mistake, 
  please let us know and then delete it from your system; you 
  should not copy, disclose, or distribute its contents to 
  anyone nor act in reliance on this e-mail, as this is 
  prohibited and may be unlawful.
  
  The registered office of Marks and Spencer Financial Services 
  Limited, Marks and Spencer Unit Trust Management Limited, 
  Marks and Spencer Life Assurance Limited and Marks and 
  Spencer Savings and Investments Limited is Kings Meadow, 
  Chester, CH99 9FB.
  
  ___
  Perl-Win32-Users mailing list
  [EMAIL PROTECTED]
  http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
  
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Format number

2002-01-10 Thread Morse, Richard E.

In the camel book they discuss this -- so it should be somewhere in the
documentation?

Ricky

-Original Message-
From: Cristian Carvajal [mailto:[EMAIL PROTECTED]]
Sent: Thursday 10 January 2002 1:57 PM
To: [EMAIL PROTECTED]
Subject: Format number


Desire to take a variable to scale and to give format him of numerico
 example 3145 == 3.145,00

and used sprintf but does not give this format anybody me knows since I can
do this


thanks

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Format number

2002-01-10 Thread Ian . Stewart

Yes.

dolljunkie pointed me to perldoc perllocale.  Pretty cool!


Thanx,
Ian

 -Original Message-
 From: Morse, Richard E. [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 10, 2002 3:36 PM
 To: 'Cristian Carvajal'; [EMAIL PROTECTED]
 Subject: RE: Format number
 
 
 In the camel book they discuss this -- so it should be 
 somewhere in the
 documentation?
 
 Ricky
 
 -Original Message-
 From: Cristian Carvajal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday 10 January 2002 1:57 PM
 To: [EMAIL PROTECTED]
 Subject: Format number
 
 
 Desire to take a variable to scale and to give format him of numerico
  example 3145 == 3.145,00
 
 and used sprintf but does not give this format anybody me 
 knows since I can
 do this
 
 
 thanks
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: Format number

2002-01-10 Thread dolljunkie


- Original Message -
From: [EMAIL PROTECTED]

 Yes.

 dolljunkie pointed me to perldoc perllocale.  Pretty cool!



Sorry, meant to post that to the whole list, but the reply-to headers got
me! =)

You can also access the docs online at:
http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/Pod/perll
ocale.html

!c

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users