Strtol

Score: 183.42 (pass)

#!perl -lp
@@{zeontwthfofisiseeiniteelm=~/..?/g,a,b}=(0..11,6,3,9);@:=map'*100'x/^h/||/a|m|b/&&")*1e$@{$&}+("||'+'.1x/lv|.te/.@@{/../,$&}.0 x/y/,/\w+/g;$_=eval"(@:)";1while s/\B...(,|$)/,$&/

Score: 185.44 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteelm=~/..?/g,a,b}=(0..11,6,3,9);@_=map'*100'x/^h/||/a|m|b/&&")*1e$a{$&}+("||'+'.1x/lv|een/.(/../,$a{$&}).0 x/y/,/\w+/g;$_=eval"(@_)";1while s/\B...(,|$)/,$&/

Score: 188.44 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,a,'m',b}=(0..11,3,6,9);@_=map{"*100"x/^h/||/a|m|b/&&")*1e$a{$&}+("||"+".1x/lv|een/.(/../,$a{$&}).0 x/y/}/\w+/g;$_=eval"(@_)";1while s/\B...(,|$)/,$&/

Score: 193.46 (pass)

two chars and one step ahead this time ;-)

by 0.03

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,a,'m',b}=(0..11,2,3,6,9);map{/^h|a|m|b/?$n.=0 x$a{$&}:(/../,$n+=$a{$&}.0 x/y/+10*/lv|een/);$N+=$n,$n=0if/[amb]/}/\w+/g;$_=$N+$n;1while s/\B...(,|$)/,$&/

Score: 195.46 (pass)

one day, one character?

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,a,'m',b}=(0..11,2,3,6,9);map{/^h|a|m|b/?$n.=0 x$a{$&}:(/../,$n+=$a{$&}.0 x/y/+10*/lv|een/);$N+=$n,$n=0if/[amb]/}/\w+/g;$_=$N+$n;1while s/\B\d{3}(,|$)/,$&/

Score: 196.49 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,a,'m',b}=(0..11,2,3,6,9);for$n(split/on |nd /){/^h|a|m|b/?$n.=0 x$a{$&}:/../?$n+=$a{$&}.0 x/y/+10*/lv|een/:0for$n=~/\w+/g;$_+=$n}1while s/\B\d{3}(,|$)/,$&/

Score: 198.50 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,a,'m',b}=(0..11,2,3,6,9);for$n(split/on |nd /){/^h|a|m|b/?$n.=0 x$a{$&}:/../?$n+=$a{$&}.0 x/y/+10*/lv|een/:0for$n=~/\w+/g;$_+=$n}1while s/(\d+)(\d{3})/$1,$2/

Score: 208.50 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,tho,'m',b}=(0..11,2,3,6,9);map{/^(h|tho|m|b)/?$n.=0 x$a{$&}:/../?$n+=$a{$&}.0 x/y/+10*/lv|een/:0for/\w+/g;$N+=$n,$n=0}split/on |nd /;$_=$N;1while s/(\d+)(\d{3})/$1,$2/

Score: 211.49 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,tho,'m',b}=(0..11,2,3,6,9);map{$n=0;/^(h|tho|m|b)/?$n.=0 x$a{$&}:/../?$n+=$a{$&}.0 x/y/+10*/lv|een/:0for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/(\d+)(\d{3})/$1,$2/

Score: 213.48 (pass)

#!perl -lp
@a{zeontwthfofisiseeiniteel=~/../g,h,tho,'m',b}=(0..11,2,3,6,9);map{$n=0;/^(h|tho|m|b)/?$n.=0 x$a{$&}:/^../?$n+=$a{$&}*10**/y/+10*/lv|een/:0for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/(\d+)(\d{3})/$1,$2/

Score: 216.48 (pass)

#!perl -lp
$"="|";@a{zeontwthfofisiseeiniteel=~/../g,@b=qw/h tho m b/}=(0..11,2,3,6,9);map{$n=0;/^@b/?$n.=0 x$a{$&}:/^../?$n+=$a{$&}*10**/y/+10*/lv|een/:0for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/(\d+)(\d{3})/$1,$2/

Score: 224.51 (pass)

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/,@b=qw/h tho m b/}=(0..11,2,3,6,9);map{$n=0;/^@b/?$n.=0 x$a{$&}:/^@a/?$n+=$a{$&}*10**/y/+10*/lv|een/:0for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/(\d+)(\d{3})/$1,$2/

Score: 229.51 (pass)

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h tho m b/}=(2,3,6,9);map{$n=0;/^@b/?$n.=0 x$b{$&}:/^@a/?$n+=$a{$&}*10**/y/+10*/lv|een/:1for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/^(\d+)(\d{3})/$1,$2/

Score: 231.50 (pass)

simple rearrangement

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h tho m b/}=(2,3,6,9);map{$n=0;/^@b/?$n*=10**$b{$&}:/^@a/?$n+=$a{$&}*10**/y$/+10*/lv|een/:1for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/^(\d+)(\d{3})/$1,$2/

Score: 237.46 (pass)

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h tho m b/}=(2,3,6,9);s/(.*?) (\w+(nd|on)\b)/+($1)$2/g;s!\w+!$_=$&;/^@b/?"*1e$b{$&}":/^@a/?"+".($a{$&}*10**/y/+10*/lv|een/):""!ge;$_=eval;1while s/^(\d+)(\d{3})/$1,$2/

Score: 240.45 (pass)

New method, but, is worse than my other. Let's see if I can improve on this.

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h tho m b/}=(2,3,6,9);s/(.*?) (\w*(nd|on)\b)/+($1)$2/g;s!\w+!$_=$&;/^@b/?"*1e$b{$&}":/^(@a)/?"+".($a{$+}*10**/y$/+10*/lv|een/):""!ge;$_=eval;1while s/^(\d+)(\d{3})/$1,$2/

Score: 241.48 (pass)

minor improvements.

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h t m b/}=(2,3,6,9);map{$n=0;/^(@a)/&&!/[ad]$/?$n+=$a{$+}*10**/y$/+10*/lv|een/:/^@b/?$n*=10**$b{$&}:1for/\w+/g;$N+=$n}split/(?:on|nd) /;$_=$N;1while s/^(\d+)(\d{3})/$1,$2/

Score: 254.47 (pass)

ugly. but it's a start.

Yanick said the same thing, and his is 100 characters longer

#!perl -lp
$"="|";@a{@a=qw/z o tw th fo fi si se ei n te el/}=0..11;@b{@b=qw/h t m b/}=(2,3,6,9);
map{$n=0;/^(@a)/&&!/[ad]$/?$n+=$a{$+}*(/y$/?10:1)+(/(lve|een)$/?10:0):/^@b/?$n*=10**$b{$&}:1for/\w+/g;$N+=$n}split/(?:on|nd) /;
$_=$N;1while s/^(\d+)(\d{3})/$1,$2/