CoderZone.org

Category: >> Perl Code >> Create string by formatting an amount as money Bookmark and Share

<< lastnext >>

Snippet Name: Create string by formatting an amount as money

Description: This uses Tan D Nguyen's module "Locale-Currency-Format".

Comment: Locale-Currency-Format

Author: CoderZone
Language: PERL
Highlight Mode: PERL
Last Modified: March 06th, 2009

use Locale::Currency::Format;
 
my $amount  = 10000;
my $dollars = currency_format('usd', $amount, FMT_SYMBOL);
print "I want $dollars so I can buy a pony.";
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 6