in reply to Spelled out numbers to numerical equivalent function

Or roll your own.
use strict; my $hash = { 'first' => '1st', 'second' => '2nd', 'third' => '3rd', 'twentythird' => '23rd', }; sub ordinal_t2n { my @ret; for (@_) { my $b = "$_"; $b =~ s/(\w+)/$hash->{lc($1)} or $1/eg; push @ret, $b; } @ret; } print ordinal_t2n('First, Second, Third, Twentythird', 'First, Second, Three is not here Third, Twentythird +'),"\n";
-- gam3
A picture is worth a thousand words, but takes 200K.