Have you checked out the Lingua::EN::Numbers module? (Assuming you need English)
Code:
use Lingua::EN::Numbers qw(num2en num2en_ordinal);
my $x = 234;
my $y = 54;
print "You have ", num2en($x), " things to do today!\n";
print "You will stop caring after the ", num2en_ordinal($y), ".\n";
Prints
Code:
You have two hundred and thirty-four things to do today!
You will stop caring after the fifty-fourth.
That's taken directly from the CPAN site, but it sounds like what you need.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.