NAME
Number::Format::SouthAsian - format numbers in the South Asian style
SYNOPSIS
Formats numbers in the South Asian style. You can read more on Wikipedia here:
http://en.wikipedia.org/wiki/South_Asian_numbering_system
The format_number() method has a words parameter which tells it to use words rather than simply separating the numbers with commas.
my $formatter = Number::Format::SouthAsian->new();
say $formatter->format_number(12345678); # 1,23,45,678
say $formatter->format_number(12345678, words => 1); # 1.2345678 crores
You can also specify words to new(), which has the affect of setting a default value to be used.
my $formatter = Number::Format::SouthAsian->new(words => 1);
say $formatter->format_number(12345678); # 1.2345678 crores
say $formatter->format_number(12345678, words => 0); # 1,23,45,678
Copyright
Copyright (C) 2010 Lokku Ltd.
Author
Alex Balhatchet (alex@lokku.com)