Subject: | numbers in the form 99_999_999_999 are misinterpreted (its not ninety nine) |
Hi.
podmaster(cpanid) here
if you try
perl -MNumber::Spell -e die(spell_number(shift)) 99_999_999_999
it yields
ninety nine at -e line 1.
that's obviously not right
the correct answer is
ninety nine billion nine hundred ninety nine million nine hundred ninety nine thousand nin
e hundred ninety nine at -e line 1.
which the following patch will ensure
sub spell_number{
my $data=shift;
my %opts=@_;
$data =~ y/_//ds; ## squash the _