Strtol Post Mortem Back to Perl Golf

Accepted | Artistic/Unorthodox | Rejected

Referee comments are in italics. Blue rows denote golfer's best solution. Red text denotes special characters.

Accepted

ScoreGolferSubmit TimeCode
112.26 BoB (Best of Breed - referees) Fri Oct 11 21:14:56 2002
-lp040 $@+=$@%1e3*(9x(3*y/dbl/\xe4/-4*/e/))||/te|\xe4/././*$+['^A^S^\^I^O^Z^V^L^G'!~($&^o&$')].e./y/}{$_=$@;s/\B(?=(...)*$)/,/g
Stolen from Rick.
113.26 BoB (Best of Breed - referees) Wed Oct 9 20:19:35 2002
-lp040 $@+=$@%1e3*(9x(3*y/dbl/\xe4/-4*/e/))||/te|\xe4/././*$+['^A^S^\^I^O^Z^V^L^G'!~($&^o&$')].$[x/y/}{$_=$@;s/\B(?=(...)*$)/,/g
Just a small improvement (and it's not even Bob's own idea)

Go BoB!!!

113.33 BoB (Best of Breed - referees) Mon Oct 7 04:19:46 2002
-lp040 $@+=$@%1e3*(9x(3*y/dbl//-4*/e/))||/tee|lv/.$+['\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$[x/y/}{$_=$@;s/\B(?=(...)*$)/,/g
This is getting ridiculous.
115.30 Ton Hospel Wed Oct 9 01:31:37 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl/\xe4/-4*/e/))||/te|\xe4/././*$+['^A^S^\^I^O^Z^V^L^G'!~($&^o&$')].$[x/y/}$_=$^;{s/\B..\d\b/,$&/&&redo
Seems to have an evil char again (strange. which one ?) Retry with binary upload
115.31 Ton Hospel Wed Oct 9 01:13:57 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl/d/-4*/e/))||/te|d/././*$+['^A^S^\^I^O^Z^V^L^G'!~($&^o&$')].$[x/y/}$_=$^;{s/\B..\d\b/,$&/&&redo
The logical followup
116.32 Rick Klement Wed Oct 9 20:26:55 2002
-lp040 $@+=y/ma-d/6392/?$@%1e3*/\d/*(9x$&):/.{5}e/.'\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'=~pack(H2,$_)*$+[0].e./y/}{$_=$@;s/\B(?=(...)+$)/,/g
116.32 Ton Hospel Wed Oct 9 00:16:04 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl/t/-4*/e/))||/te|tv/././*$+['^A^S^\^I^O^Z^V^L^G'!~($&^o&$')].$[x/y/}$_=$^;{s/\B..\d\b/,$&/&&redo
further sickification
117.30 Ton Hospel Tue Oct 8 22:12:07 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/././*$+['^I^B^T\0^F^S^W^E^N^C^A'!~($&^v&$')].$[x/y/}$_=$^;{s/\B..\d\b/,$&/&&redo
another simply removable char
118.31 Ton Hospel Tue Oct 8 22:05:39 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/././*$+['^I^B^T\0^F^S^W^E^N^C^A'!~($&^v&$')].$[x/y/}{$_=$^;1while+s/\B..\d\b/,$&/
MM, previous attempt looses ^@. retry with file upload
118.33 Rick Klement Tue Oct 8 20:59:47 2002
-lp040 $@+=y/bmd/63/?$@%1e3*(9x($_+2+/o/)):/lv|ee./.'\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'=~pack(H2,$_)*$+[0].$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
I'm trying upload because last time the score was wrong (possible copy/paste problem). This one should be 118.33
118.42 Ton Hospel Tue Oct 8 13:22:44 2002
-lp040 $a+=$a%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/././+index(')"4 &37%.Q!',$&^V&$').$[x/y/}{$_=$a;1while s/\B..\d\b/,$&/
sometimes it takes very long to see the obvious

5 more obvious characters to lose, then.

119.42 Ton Hospel Mon Oct 7 17:46:02 2002
-lp040 $a+=$a%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/././+index(')"4 &37%.Q!',$&^V&$').$[x/y/}{$_=$a;1while s/\B..\B.\b/,$&/
Forgot to drop useless chars
119.58 Mtv Europe Fri Oct 11 16:04:24 2002
-lp040 $a=/a|ll/?($b|='000,'x y/bis//.$a)x0:0*y/htfsleno/025-9/x/y/.$_%98%38%23%17 ./28|7/|0 x2x/d/.$a}{$_=reverse$b|$a
yesss, i joined 110 club!

Competition is heating up!!

120.41 BoB (Best of Breed - referees) Mon Oct 7 01:38:39 2002
-lp040 $@+=$@%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/./..//2*$+[ontwthfofisiseeini::el!~$&].$[x/y/}{$_=$@;s/\B(?=(...)*$)/,/g
Just a tiebreak improvement.
120.44 Mtv Europe Wed Oct 9 09:21:32 2002
-lp040 $a=/a|ll/?($q|='000,'x y/abi//.$a)x0:$?x/y|z/.$-['\xde\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r#\xe5'!~pack+H2,$_]./lv|te/|"00"x/d/.$a}{$_=reverse$a|$q
120.45 BoB (Best of Breed - referees) Mon Oct 7 00:49:43 2002
-lp040 $a+=$a%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/./..//2*$+[ontwthfofisiseeiniQQel!~$&].$[x/y/}{$_=$a;s/\B(?=(...)*$)/,/g
121.42 Ton Hospel Mon Oct 7 17:42:53 2002
-lp040 $a+=$a%1e3*(9x(3*y/dbl//-4*/e/))||/tee|lv/././*index('>)"4 &37%.0!',$&^V&$').$[x/y/}{$_=$a;1while s/\B..\B.\b/,$&/
Encoding now with more nuts

crunchy

122.37 Rick Klement Tue Oct 8 16:06:56 2002
-lp040 $@+=/hu|..o\B/g?$@%1e3*(9x(/b/?9:pos)):/lv|ee./.index('>~G\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack+H2,$_).$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
The string in the index() is ">\207\320\321\370\362\302\316\342r\336\345"
122.60 Mtv Europe Fri Oct 11 15:32:14 2002
-lp040 $a=/a|ll/?($b|='000,'x y/bis//.$a)x0:0*y/tfsenohl/2568990/x/y/.$_%98%38%23%17 ./28|80/|0 x2x/d/.$a}{$_=reverse$b|$a
i sew a new heart to this horse, but unfortunately it's longer than my previous approach.

giddy up (surprisingly, this is only the second mention of our deceased equine friends)

124.39 Mtv Europe Tue Oct 8 19:50:44 2002
-lp040 $,=/a|ll/?($"|='000,'x+y/bis//.$,)x0:/d/?"00$,":$?x/ten|y/.$-['>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r_\xe5'!~pack+H2,$_]./lv|te/|$,}{$_=reverse$"|$,
124.50 Ton Hospel Mon Oct 7 00:32:25 2002
-lp040 $a+=$a%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/./..//2*$+[ontwthfofisiseeiniQQel!~$&].$[x/y/}{$_=$a;1while s/\B..\B.\b/,$&/
ok, finally getting some grip on this.
125.30 BoB (Best of Breed - referees) Sun Oct 6 21:29:32 2002
-lp040 $@-=/a|ll/?$@=$^-=$@.e.3*y/iab//:/lv|een/.@+['\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$|x/y/-/d/*$@*99}$_=$^-$@;{s/(?=\B(...)*$)/,/g
125.44 Mtv Europe Tue Oct 8 17:27:03 2002
-alp $,=/a|ll/?($a|='000,'x y/bis//.$,)x0:/d/?"00$,":0 x/y/.$-['>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_]%10 ./el|te/|$,for@F,a;$_=reverse$a
don't look at it or your aesthetic feeling will be staggered. anyway, today's job complete.

aesthetic or not ... it works :)

126.29 Mtv Europe Sun Oct 6 21:03:45 2002
-lp040 $;-=/a|ll/?$;=$,-=$;.e.3*y/iba//:/d/?-$;*99:/lv|tee/.@+['\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$?x/y/}{$_=$,-$;;s/(?=\B(...)*$)/,/g
catch BoB again!

Hmpf

126.29 BoB (Best of Breed - referees) Sun Oct 6 20:04:55 2002
-lp040 $@-=/a|ll/?$@=$^-=$@.e.3*y/bai//:/lv|ee./.@-['>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$|x/y/-/d/*$@*99}$_=$^-$@;{s/(?=\B(...)*$)/,/g
127.29 BoB (Best of Breed - referees) Sun Oct 6 18:59:50 2002
-lp040 $@-=/a|ll/?$@=$^-=$@.e.3*y/bai//:/d/?-$@*99:/lv|een/.@-['>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$|x/y/}$_=$^-$@;{s/(?=\B(...)*$)/,/g
129.30 Mtv Europe Sun Oct 6 18:42:05 2002
-apl $;-=/a|ll/?$;=$,-=$;.e.3*y/iba//:/d/?-$;*99:/lv|tee/.@-['>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5'!~pack+H2,$_].$?x/y/for@F;$_=$,-$;;s/(?=\B(...)*$)/,/g
ah, it was not this trick?

Nope.

129.33 BoB (Best of Breed - referees) Sun Oct 6 18:14:43 2002
-lp040 $@-=/a|ll/?$@=$^-=$@.e.3*y/iba//:/d/?-$@*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack+H2,$_).$|x/y/}$_=$^-$@;{s/(?=\B(...)*$)/,/g
129.45 Rick Klement Mon Oct 7 15:47:50 2002
-lp040 $@+=/d|io/?$@%1e3*(9x(3*(3&1+ord)-/r/)):/lv|ee./.ondgdhfoficiceeinideel=~(oo&$_)/2*$+[0].$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
getting tight at the top
130.50 Juho Snellman Wed Oct 9 03:09:06 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+($+)*1E0$/
%gi,--$/while
b__m__THoHuyzOnwThFofSisEiiqv=~/[(-^]*./g;$_-=eval;s/.(?=(...)+$)/$&,/g
131.34 BoB (Best of Breed - referees) Sun Oct 6 17:29:05 2002
-lp040 $@+=/a|ll/?!($^+=$@.e.3*y/abi//)-$@:/d/?$@*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack H2,$_).0
x/y/}$_=$^+$@;{s/\B(?=(...)*$)/,/g
131.41 Stephen Turner Tue Oct 8 08:30:57 2002
-pal $*+=9x(3*/b|d/+6*/ll/-/^h/)*($*%1e3)||/te|l/.2*/s|w|th/+/ne|fi|ev|th/+4*/s|f/+8*/g|^n/.$|x/y/for@F;s/\B..\d\b/,$&/for($_=$*)x3
Re-arranging terms saves another two strokes.
131.41 Mtv Europe Sun Oct 6 18:03:02 2002
-apl $n-=/a|ll/?$n=$s-=$n.e.3*y/iba//:/d/?-$n*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack
H2,$_).0
x/y/for@F;$_=$s-$n;s/(?=\B(...)*$)/,/g
i love this race

I can imagine

131.50 Juho Snellman Wed Oct 9 02:00:07 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+(
$+)*1E0$/
%gi,--$/while
b__m__THoHuyzOnwThFofSisEiiqv=~/[(-^]*./g;$_-=eval;s/.(?=(...)+$)/$&,/g
As usual, submitting a minor improvement immediately leads to discovery of another improvement just minutes later.
132.36 BoB (Best of Breed - referees) Sun Oct 6 17:26:17 2002
-lp040 $@+=/a|ll/?!($^+=$@.e.3*y/abi//)-$@:/d/?$@*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack H2,$_).0
x/y/}for($^+$@){s/\B(?=(...)*$)/,/g
132.43 Juho Snellman Wed Oct 9 01:54:00 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+(
$+)*1E0$/
%gi,--$/while"b!!m!!.HoHuyzOnwTh+of+xs+giqv"=~/[(-^]*./g;$_-=eval;s/.(?=(...)+$)/$&,/g
Remove unneccessary characters from the data-string. (Doh.)
133.35 BoB (Best of Breed - referees) Sun Oct 6 15:12:19 2002
-apl $@+=/a|ll/?!($^+=$@.e.3*y/abi//)-$@:/d/?$@*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack H2,$_).0
x/y/for@F;$_=$^+$@;s/\B(?=(...)*$)/,/g
133.41 Stephen Turner Tue Oct 8 08:07:39 2002
-pal $*+=9x(3*/b|d/+6*/ll/-/^h/)*($*%1e3)||/te|l/.0+/ne|fi|ev|th/+2*/s|w|th/+4*/s|f/+8*/g|^n/.$|x/y/for@F;s/\B..\d\b/,$&/for($_=$*)x3
.0 instead of *10 etc. Numbers are strings!

they sure are

133.41 Mtv Europe Sun Oct 6 15:00:43 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*y/iba//)-$n:/d/?$n*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack
H2,$_).0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
Bob is not amused.
133.41 BoB (Best of Breed - referees) Sat Oct 5 22:51:12 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*y/abi//)-$n:/d/?$n*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack H2,$_).0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
134.43 Juho Snellman Tue Oct 8 15:59:02 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+(
$+)*1E0$/
%gi,--$/while"b!!m!!.HoHuyzOn+wTh+rf+xs+g+iqv"=~/[(-^]*./g;$_-=eval;s/.(?=(...)+$)/$&,/g
Two days of beating my head against a brick wall produces an improvement of 1.01 strokes.
135.44 Juho Snellman Mon Oct 7 03:15:15 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+(
$+)*1E0$/
%gi,--$/while"b!!m!!THoHuyzOn+wTh+rf+xs+g+iqv"=~/[(-^]*./g;$_=0-eval;s/.(?=(...)+$)/$&,/g
Finally pass Stephen.
137.39 Mtv Europe Sat Oct 5 22:23:49 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/d/?$n*99:/lv|een/.index('>\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r\xde\xe5',pack H2,$_).0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
update to 137
137.42 Stephen Turner Sun Oct 6 22:01:55 2002
-pal $*+=9x(3*/b|d/+6*/ll/-/^h/)*($*%1e3)||(/ne|fi|ev|th/+2*/s|w|th/+4*/s|f/+8*/g|^n/+10*/te|l/)*10**/y/for@F;s/\B..\d\b/,$&/for($_=$*)x3
Changing + to || allows me to save six strokes in the second half of the expression.

You're getting closer!

138.38 Mtv Europe Sat Oct 5 22:20:25 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/d/?$n*99:/lv|een/.index('^\\x87\xf2\xe2p\xd0\xd3^S\xd1\xd8^R\xa1',~pack h2,$_).0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
sorry, finally i get into those unprinted chars again :) actually without bitwise negation of pack it's 137 but with one char with code \15 that can confuse some platforms.

Please stop demoralizing the other competitors. You now have a lead of more than 30 strokes!

139.37 Michael Thelen Sat Oct 12 03:38:35 2002
-lpa /[a-dm]/?$;=3*$+[amb!~$&]||$;+2:($,+=/te|l/.$+[/../,ontwthfofisiseeini!~$&]/2+/le/.$?x(/y/+$;))while$_=pop@F;$_=$,;s/\B(?=(...)+$)/,/g
Almost missed the super obvious transformation from $^F to 2
139.45 Juho Snellman Mon Oct 7 02:46:21 2002
-lp071 s/te|lv/ q/g;s%(.*?)$&\w*%+(
$+)*1E0$/
%gi,--$/while
"b!!m!!THoHuyzOn+wTh+rf+xs+g+iq+v"=~/[(-^]*./g;$_=abs
eval;s/.(?=(...)+$)/$&,/g
139.53 Alma Media Golf Team Thu Oct 10 14:03:35 2002
-pl s/[bam]/)*1E$&+(/g;for$,(qw/one w h.?r fo fi x se g in te|lv
le/){++$";s/$,/+$"/g}y/zyma-x /00639 0/d;$_=eval"($_)";s/\B(?=(...)+$)/,/g
uh. this is getting painfully difficult to golf..

40 strokes ahead of tanma, though

140.36 Keith Calvert Ivey Sat Oct 12 04:01:47 2002
-lpa $*+=/a|io/?($@+=$**1e3**y/bit//,-$*):/te|l/.8*/g|^n/+4*/f|s/+2*/s|w|th/+/ne|th|fi|ev/.$%x/y/+99*/d/*$*for@F,a;$_=$@;s/\B(?=(...)+$)/,/g
Up another place; and you still have an hour to catch Michael Thelen
140.36 Michael Thelen Sat Oct 12 03:34:43 2002
-lpa /[a-dm]/?$;=3*$+[amb!~$&]||$;+2:($,+=/te|l/.$+[/../,ontwthfofisiseeini!~$&]/$^F+/le/.$?x(/y/+$;))while$_=pop@F;$_=$,;s/\B(?=(...)+$)/,/g
Shortening the 'zeon' string even more.
141.30 Michael Rybakin Fri Oct 11 12:35:21 2002
-apl /(b|li|nd$)/?$^+="$~e".(9-$-[$~=0]):$~+=/d/?$~*99:/(te|lv)/.(1+index"\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r-\xe5",pack+H2,$_)*10**/y/for@F;$_=$~+$^;s/.(?=(...)+$)/$&,/g
141.35 Keith Calvert Ivey Sat Oct 12 03:48:57 2002
-lpa $*+=/a|io/?($@+=$**1e3**y/bit//,-$*):/te|l/.8*/g|^n/+4*/f|s/+2*/s|w|th/+/ne|th|fi|ev/.$%x/y/+99*/d/*$*for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
141.38 Michael Thelen Sat Oct 12 03:11:31 2002
-lpa /[a-dm]/?$;=3*$+[amb!~$&]||$;+2:($,+=/.te|lv/.$+[/../,ontwthfofisiseeiniteel!~$&]/$^F.$?x(/y/+$;))while$_=pop@F;$_=$,;s/\B(?=(...)+$)/,/g
A couple more strokes by ditching \d{3} in favor of ...
141.55 Alma Media Golf Team Wed Oct 9 21:37:12 2002
-pl s/[bam]/)*1E$&+(/g;for$i(qw/one w hi?r fo fi x se g in (te|lv) le/){++$n;s/$i/+$n/g}y/zyma-x /00639x0/d;$_=eval"($_)";s/\B(?=(...)+$)/,/g
142.31 Michael Rybakin Wed Oct 9 22:43:51 2002
-apl /(b|li|nd$)/?$^+="$~e".(9-$-[$~=0]):$~+=/d/?$~*99:/(te|lv)/.(1+index"\x87\xd0\xd1\xf8\xf2\xc2\xce\xe2r-\xe5",pack+H2,$_)*10**/y/for@F;$_=$~+$^;s/\d(?=(...)+$)/$&,/g
142.40 Stephen Turner Sun Oct 6 19:02:09 2002
-pal $*+=9x(3*/b|d/+6*/ll/-/^h/)*($*%1e3)+(/ne|fi|ev/+2*/^s|w/+3*/h.?r/+4*/^s|f/+8*/g|^n/+10*/te|el/)*10**/y/for@F;s/\B..\d\b/,$&/for($_=$*)x3
More fiddling with the string-to-number function to lose another four strokes.
142.51 Juho Snellman Mon Oct 7 01:15:19 2002
-lp071 s/te|lv/ q/g;s%(.*?)$@t?$&\w*%+(
$1)*1E0$/
%g,--$/or$@='.*'while
b__m__hohuyzonwthrfxsgiqv=~/[hot]?./g;$_=abs eval;s/.(?=(...)+$)/$&,/g
This is undoubtedly the most perverse piece of code I've ever written. Too bad that it's nowhere near enough in this sort of competition... :-(
143.39 Michael Thelen Sat Oct 12 03:03:44 2002
-lpa /[a-dm]/?$;=3*$+[amb!~$&]||$;+2:($,+=/.te|lv/.$+[/../,ontwthfofisiseeiniteel!~$&]/$^F.$?x(/y/+$;))while$_=pop@F;$_=$,;s/\B(?=(\d{3})+$)/,/g
Another tiebreak improvement. That last substitution looks like it should be able to be reduced somehow...
143.40 Michael Thelen Fri Oct 11 23:46:29 2002
-pa /[a-dm]/?$;=3*$+[amb!~$&]||$;+2:($\+=/.te|lv/.$+[/../,ontwthfofisiseeiniteel!~$&]/$^F.$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
I've been thinking too iteratively. Thinking more recursively yields four strokes.
144.35 Keith Calvert Ivey Sat Oct 12 02:42:50 2002
-lpa /a|io/?($@+=$**1e3**y/bit//,$*=0):($*+=/te|l/.8*/g|^n/+4*/f|s/+2*/s|w|th/+/ne|th|fi|ev/.$%x/y/+99*/d/*$*)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
144.44 Mtv Europe Sat Oct 5 21:46:49 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/d/?$n*99:/lv|een/.index('K_EFWVBCT^DU',$&x/./^y/hrwx//x1).0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
Very nice indeed.
144.48 Juho Snellman Sun Oct 6 23:41:43 2002
-lp071 s/te|lv/ q/g;s%(.*?)t?$&\w*%+($1)*1E$/
%g||s%\w*$&\w*%$/%gi,--$/while
b__m__hohuyZONWTHRFXSGIQV=~/[hOT]?./g;$_=-eval;s/.(?=(...)+$)/$&,/g
Use $/ as counter instead of $=, and initialize it using -0.
144.53 Alma Media Golf Team Wed Oct 9 20:43:53 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le#){++$n;s/$i/+$n/g}s/[bam]/)*1E$&+(/g;y#zyma-x #00639x0#d;$_=eval"($_)";s/.+?(?=(...)+$)/$&,/g
146.29 Michael Rybakin Wed Oct 9 13:14:31 2002
-apl /(b|li|nd$)/?$^+="$~e".(9-$-[$~=0]):$~+=/d/?$~*99:/(te|lv)/.(/./+index'!"<(.;7-&~)','^'&$'^$&)*10**/y/for@F;$_=$~+$^;s/...\b/,$&/while/\d{4}/
146.34 Keith Calvert Ivey Sat Oct 12 02:28:05 2002
-lpa /a|io/?($@+=$**1e3**y/bit//,$*=0):($*+=/te|l/.(/ne|th|fi|ev/+2*/s|w|th/+4*/f|s/+8*/g|^n/).$%x/y/+99*/d/*$*)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
146.40 Stephen Turner Sun Oct 6 14:51:58 2002
-pal $*+=9x(3*/us|b/+6*/ll/+2*/^h/)*($*%1e3)+(/ne|fi|ev/+2*/^s|w/+3*/h.?r/+4*/^s|f/+8*/g|^n/+10*/te|el/)*10**/y$/for@F;s/\B..\d\b/,$&/for($_=$*)x3
To my surprise, I can lose yet another stroke from the comma-ing routine.
147.29 Michael Rybakin Tue Oct 8 08:38:23 2002
-apl /(b|li|nd$)/?$^+="$~e".(9-$-[$~=0]):$~+=/d/?$~*99:/(te|lv)/.(/./+index'!"<(.;7-& )','^'&$'^$&).(/y/&&0)for@F;$_=$~+$^;s/...\b/,$&/while/\d{4}/
On Saturday, I would never have believed that a solution like this would be nearly 30 off the leader
147.35 Keith Calvert Ivey Sat Oct 12 02:17:45 2002
-lpa /a|io/?($@+=$**1e3**y/bit//,$*=0):($*+=/ne|th|fi|ev/+2*/s|w|th/+4*/f|s/+8*/g|^n/.$%x/y/+10*/te|l/+99*/d/*$*)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
147.41 Stephen Turner Sun Oct 6 14:26:26 2002
-pal $*+=9x(3*/us|b/+6*/ll/+2*/^h/)*($*%1e3)+(/ne|fi|ev/+2*/^s|w/+3*/h.?r/+4*/^s|f/+8*/g|^n/+10*/te|el/)*10**/y$/for@F;s/\B\d{3}\b/,$&/for($_=$*)x3
Lose another three strokes from comma-ing expression to get sub-150.
147.41 Michael Thelen Fri Oct 11 23:27:52 2002
-pa /[a-dm]/?$;=amb=~$&?3*$+[0]:$;+2:($\+=/.te|lv/.(/../,ontwthfofisiseeiniteel=~$&*$+[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
The latest in a series of infinitessimal improvements. Sorry, refs! :-)

see comment for previous solution :)

147.46 Juho Snellman Sun Oct 6 13:29:27 2002
-pl $=/=6;s/te|lv/ q/g;--$=>0?s/(.*?)t?$&\w*/+($1)*1E$=
/g:s%\w*$&\w*%$=%gwhile
b__m__hohuyzonwthrfxsgiqv=~/[hot]?./g;$_=-eval;s/.(?=(...)+$)/$&,/g
I'm starting to suspect the vitality of this horse.
147.48 Mtv Europe Sat Oct 5 16:31:54 2002
-apl $n+=/a|ll/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/d/?$n*99:/lv|een/.index(zeontwthfofisiseeiniteel,$&x/../)/2
.0
x/y/for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
sorry, i didn't read my mail. please reject my uue approach, even for no reason. i'm back for normal operation, at least until ton- get approved his 47 :)

the encoded solution is contentious. I'm letting Eugene be final arbiter

148.36 Keith Calvert Ivey Wed Oct 9 01:41:54 2002
-lpa /il|d/?($@+=/o/*$**1e3**y/bit//,$**=/r/*100):($*+=/ne|th|fi|ev/+2*/s|w|th/+4*/f|s/+8*/g|in/.$%x/y/+/te|l/*10)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
148.41 Michael Thelen Fri Oct 11 23:26:10 2002
-pa /[a-dm]/?$;=amb=~$&?3*$+[0]:$;+2:($\+=/.te|lv/.(/../,ontwthfofisiseeiniteel=~$&&&$+[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
One more stroke gone, and -finally- the 'zeon' string is a little bit shorter.

you are allowed to leave more time for improvements between submissions you know :)

148.49 BoB (Best of Breed - referees) Sat Oct 5 14:01:10 2002
-pal $n+=/hu/?$n*99:/d|il/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/lv|een/.index(zeontwthfofisiseeiniteel,$&x/../)/2
.0
x/y/for@F;$_=$s+$n;s/\B(?=(...)+$)/,/g
one lousy character
148.53 Alma Media Golf Team Wed Oct 9 20:18:10 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le#){++$n;s/$i/+$n/g}s/a|m|b/)*1E$&+(/g;y#ambzydF-x #369000#d;$_=eval"($_)";s/..?.?(?=(...)+$)/$&,/g
149.34 Greg Allen Sat Oct 12 02:28:36 2002
-pla s~.*d|ll~$:*=/o/?!($;+=$:*1e3**y/bid//):100~e,$:+=/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+10*/te|el/.$?x/y/for@F;$_=$;+$:;s/.(?=(...)+$)/$&,/g
how much effort for one precious stroke?
149.42 Michael Thelen Fri Oct 11 23:16:10 2002
-pa /[a-dm]/?$;=amb=~$&?3*$+[0]:$;+2:($\+=/.te|lv/.(/../,zeontwthfofisiseeiniteel=~$&,$-[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
Another stroke shaved, yay!
149.46 Juho Snellman Sun Oct 6 12:47:33 2002
-pl $=/=6;s/te|lv/ t/g;--$=>0?s/(.*?)t?$&\w*/+($1)*1E$=
/g:s%\w*$&\w*%-+$=%giwhile
b__m__hohuyzOnwThrfxsgitv=~/[hOT]?./g;$_=eval;s/.(?=(...)+$)/$&,/g
Better handling of 12-19.
149.48 Mtv Europe Sat Oct 5 13:43:54 2002
-pal $n+=/hu/?$n*99:/[dmb]/?!($s+=$n.e.3*(1+/i/+/b/))-$n:/lv|een/.index(zeontwthfofisiseeiniteel,$&x/../)/2
.0
x/y/for@F;$_=$s+$n;s/\B(?=(...)+$)/,/g
Bob struggle
150.33 Greg Allen Wed Oct 9 20:41:51 2002
-pla $:*=/[ih]o/?!($;+=$:*1e3**y/bid//):/d/?100:($:+=/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+10*/te|el/.$?x/y/,1)for@F;$_=$:+$;;s/.(?=(...)+$)/$&,/g
150.41 Stephen Turner Sun Oct 6 14:15:56 2002
-pal $*+=9x(3*/us|b/+6*/ll/+2*/^h/)*($*%1e3)+(/ne|fi|ev/+2*/^s|w/+3*/h.?r/+4*/^s|f/+8*/g|^n/+10*/te|el/)*10**/y$/for@F;$_=$*;1until!s/\B(?=\d{3}\b)/,/
Improved comma-adding routine. Also improved tie-breaker for reduced legibility. :-)
150.41 Michael Thelen Fri Oct 11 23:13:16 2002
-pa /[a-dm]/?$;=-amb=~$&?3*$-[0]:$;+2:($\+=/.te|lv/.(/../,zeontwthfofisiseeiniteel=~$&,$-[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
Finally, an actual stroke shaved!
151.29 Michael Rybakin Tue Oct 8 06:18:29 2002
-apl /(b|li|nd$)/?$^+="$~e".(9-$-[$~=0]):$~+=/d/?$~*99:/te/./el/.(/le/||/./+index"!#<)/:6,'",'_'&$'^$&).(/y/&&0)for@F;$_=$~+$^;s/...\b/,$&/while/\d{4}/
151.34 Greg Allen Wed Oct 9 20:02:08 2002
-pla $:*=/[ih]o/?($;+=$:*1e3**y/bid//,0):/d/?100:($:+=/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+10*/te|el/.$?x/y/,1)for@F;$_=$:+$;;s/.(?=(...)+$)/$&,/g
151.41 Michael Thelen Fri Oct 11 23:06:36 2002
-pa /[a-dm]/?$;=-amb=~$&*3*$-[0]||$;+2:($\+=/.te|lv/.(/../,zeontwthfofisiseeiniteel=~$&,$-[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
And another tiebreak improvement. I only wish these were whole strokes instead of partial strokes.
151.42 Michael Thelen Fri Oct 11 23:01:36 2002
-pa /[a-dm]/?$;=damb=~$&*3*$-[0]||$;+2:($\+=/.te|lv/.(/../,zeontwthfofisiseeiniteel=~$&,$-[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
Yet Another Tiebreak Improvement.
151.44 Michael Thelen Fri Oct 11 03:14:59 2002
-pa /[a-dm]/?$;=3*index(damb,$&)||$;+2:($\+=/.te|lv/.(/../,zeontwthfofisiseeiniteel=~$&,$-[0]/2).$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
I still hate tweaking the tiebreaker, but that seems to be all I'm able to do tonight...
151.46 Michael Thelen Fri Oct 11 02:59:01 2002
-pa /[a-dm]/?$;=3*index(damb,$&)||$;+2:($\+=/.te|lv/.index(zeontwthfofisiseeiniteel,/../&&$&)/$^F.$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x$
Man, I hate just tweaking the tiebreaker.
151.49 Michael Thelen Fri Oct 11 02:13:14 2002
-pa /[damb]/?$;=3*index(damb,$&)||$;+2:($\+=/.te|lv/.index(zeontwthfofisiseeiniteel,/../&&$&)/2 .$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($\.=$/)x3
Ever so slight tiebreaker improvement.
151.50 Michael Thelen Fri Oct 11 01:46:24 2002
-lpa /[damb]/?$;=3*index(damb,$&)||$;+2:($,+=/.te|lv/.index(zeontwthfofisiseeiniteel,/../&&$&)/2 .$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($_=$,)x3
Been stuck here for a while, hoping for another breakthrough...
152.43 Juho Snellman Sun Oct 6 03:45:49 2002
-pl $=/=6;s/e.n|lv./+$=/g;--$=>0?s/(.*?)t?$&\w*/+($1)*1E$=
/g:s%\w*$&\w*%-+$=%giwhile
b__m__hohuyzOnwThrfxsgitv=~/[hOT]?./g;$_=eval;s/.(?=(...)+$)/$&,/g
152.45 Stephen Turner Sun Oct 6 14:01:51 2002
-pal $a+=9x(3*/us|b/+6*/ll/+2*/hu/)*($a%1e3)+(/ne|fi|ev/+2*/^s|w/+3*/hi?r/+4*/^s|f/+8*/g|ni/+10*/te|el/)*10**/ty/for@F;$_=$a;1while s/\d(?=\d{3}\b)/$&,/
Accumulate into one variable instead of an array.
152.51 BoB (Best of Breed - referees) Sat Oct 5 13:47:51 2002
-pal $n=/hu/?$n*100:/sa|il/?!($s+=$n*1e3**(1+/i/+/b/)):/lv|een/.index(zeontwthfofisiseeiniteel,$&x/../)/2
.0
x/ty/+$n for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
no point in not being in front

ok, so mtv thought of all that before me. And more. sheesh

152.51 Michael Thelen Thu Oct 10 04:08:46 2002
-lpa /[damb]/?$;=3*index(damb,$&)||$;+2:(/../,$,+=index(zeontwthfofisiseeiniteel,$&)/2+10*/.te|lv/.$?x(/y/+$;))while$_=pop@F;s/\B..\d\b/,$&/for($_=$,)x3
A few more improvements, and that weird for(...)x$n construction that I first saw in Cantor and somehow managed to remember just now.
152.53 Jeff Moore Sat Oct 12 04:16:48 2002
-pal /b|mi|ho/and$y=12-3*$+[0]or$z+=/te|lv/.(/../+index onthfisenielztwfosiei,$&)%0xc.e.(($y+=y~d~~)+/y/)for reverse@F;$_=$z;{s~\w+(?=\w{3})~$&,~&&redo}
153.33 Greg Allen Wed Oct 9 19:48:34 2002
-pla $:*=/[ih]o/?($;+=$:*1e3**y/bid//,0):/d/?100:($:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/,1)for@F;$_=$:+$;;s/.(?=(...)+$)/$&,/g
commafication has never been so easy...
153.54 Jeff Moore Sat Oct 12 04:02:07 2002
-pal /b|mi|ho/and$y=12-3*$+[0]or$y+=y~d~~,$z+=/te|lv/.(/../+index onthfisenielztwfosiei,$&)%0xc.e.($y+/y/)for reverse@F;$_=$z;{s~\w+(?=\w{3})~$&,~&&redo}
154.34 Greg Allen Wed Oct 9 19:34:32 2002
-pla $:*=s~[ih]o~$;+=$:*1e3**y/bid//~e?0:100*/d/||($:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/,1)for@F;$_=$:+$;;s/.(?=(...)+$)/$&,/g
commafication has never been so easy...
154.36 Rick Klement Sun Oct 6 14:31:46 2002
-lp040 @={ontwthfofisiseeiniteel=~/../g}=1..$=;!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/+/d/*99*$@:($~+=$@.$-x(3&1+ord)x3,$@=0)}{$_=$~+$@;s/\B(?=(...)+$)/,/g
155.34 Greg Allen Wed Oct 9 19:06:23 2002
-pla s~[ih]o~$;+=$:*1e3**y/bid//~e?$:=0:($:+=(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/)*=100**/d/for@F;$_=$:+$;;s/.(?=(...)+$)/$&,/g
commafication has never been so easy...
155.45 Juho Snellman Sun Oct 6 02:20:44 2002
-pl $=/=6;s/een|lve/+10/g;for$a(b__m__HoHuyzOnwThrfxshitv=~/[A-Z]?./g){--$=>0?s/(\D*?)t?$a\w*/+($1)*1E$=/gi:s%\w*$a\w*%-+$=%gi}$_=eval;s/.(?=(...)+$)/$&,/g
Integrate all of the operations into the main loop. When $= > 0, transform words into multiplications. After that, transform them into numbers. Finally, let perl evaluate the result.
155.53 Jeff Moore Sat Oct 12 01:04:14 2002
-pl /b|mi|ho/and$y=4-$+[0]or$z+=/te|lv/.(/../+index onthfisenielztwfosiei,$&)%12 .e.(y~dy~~+3*$y)for reverse/(?:\w| h)+/g;$_=$z;{s~\d+(?=\d{3})~$&,~&&redo}
156.47 Josef Drexler Thu Oct 10 17:33:22 2002
-pal $r.=/tho|mi|b/g?")*1E".3*(4-pos)."+(":/hu/?E2:'+'./tee|lv/.index(zeontwthfofisiseeiniteel,/../&&$&)/2*10**/y/for@F;$_=eval"($r+0)";s/.(?=(...)+$)/$&,/g
some more chars to get rid off
157.36 Rick Klement Sun Oct 6 00:09:40 2002
-lp040 @={ontwthfofisiseeiniteel=~/../g}=1..$=;/^h/?$@*=100:!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/:($~+=$@*1e3**(3&1+ord),$@=0)}{$_=$@+$~;s/\B(?=(...)+$)/,/g
Just a plain simple straightforward solution.
157.50 Mtv Europe Sat Oct 5 13:19:30 2002
-pal $n=/hu/?$n*100:/sa|mi|bi/?!($s+=$n*1e3**(/o/+/i/+/b/)):/lv|een/.index(zeontwthfofisiseeiniteel,$&x/../)/2
.0
x/ty/+$n
for@F;$_=$s+$n;s/\B(?=(...)*$)/,/g
should i start uue dance?

please don't

157.55 Michael Thelen Wed Oct 9 17:57:33 2002
-lpa /[damb]/?$s=3*index(damb,$&)||$s+2:(/../,$t+=index(zeontwthfofisiseeiniteel,$&)/2+10*/tee|lv/.0 x(/y/+$s))while$_=pop@F;$_=$t;1until!s/\d+(?=\d{3})/$&,/
Oh yeah, 'd' occurs in 'hundred' before it occurs in 'thousand'.
158.35 Greg Allen Wed Oct 9 18:58:02 2002
-pla s~[ih]o~$;+=$:*1e3**y/bid//~e?$:=0:($:+=(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/)*=100**/d/for@F;$_=$:+$;;s/\d(?=(\d{3})+$)/$&,/g
158.37 Keith Calvert Ivey Sun Oct 6 19:32:39 2002
-lpa @@{elontwthfofisiseeini=~/../g}=(1,1..9);/il|d/?($@+=/o/*$**1e3**y/bit//,$**=/r/*100):($*+=@@{/(..)/}.$%x/y/+/te|l/*10)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
159.40 Michael Rybakin Mon Oct 7 14:10:48 2002
-apl /(b|mi|tho)/?$^+="$~e".3*(4-$+[$~=0]):$~+=/d/?$~*99:/te/./lv/.(/y/?5:.5)*(/../+index'.ontwthfofisiseeini..el',$&)for@F;$_=$~+$^;s/...\b/,$&/while/\d{4}\b/
159.52 Jeff Moore Wed Oct 9 22:48:57 2002
-pl for$z(@z=qw~b m tho $~){s~(.+)$z~~;$z+=/te|lv/.(/../+index onthfisenielztwfosiei,$&)%12 .e.y~dy~~for$1=~/(?:\w| h)+/g}$_=sprintf',%03d'x4,@z;s~[0,]*(?!$)~~
160.42 Philippe Bricout Fri Oct 11 21:12:04 2002
-pl s!(.*?)(b|mi|tho)!"+($1)*1E".(4-length$2)*3!eg;s/ h/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index"x
^]\x8f/,\xec.'_^",pack h2,$_)#eg;$_=eval;s/.(?=(...)+$)/$&,/g
160.52 Alma Media Golf Team Wed Oct 9 19:31:40 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le#){++$n;s/$i/+$n/g}s/ou|m|b/')*1E'.uc($&).'+('/ge;y#OMBzydF-x #369000#d;$_=eval"($_)";s/..?.?(?=(...)+$)/$&,/g
160.53 Alma Media Golf Team Wed Oct 9 19:02:03 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le us m b#){++$n;s/$i/+$n/g}s#.1[234]#)*10**(3*$&-33)+(#g;y#zyda-x #000#d;$_=eval"($_)";s/..?.?(?=(...)+$)/$&,/g
160.54 Michael Thelen Wed Oct 9 17:36:06 2002
-lpa /^h|[mba]/?$s=3*index(hamb,$&)||$s+2:(s/..//,$t+=index(zeontwthfofisiseeiniteel,$&)/2+10*/te|lv/.0 x(/y/+$s))while$_=pop@F;$_=$t;1until!s/\d+(?=\d{3})/$&,/
-a and @F is one of those obvious impovements I was talking about.
161.36 Keith Calvert Ivey Sun Oct 6 18:35:06 2002
-lpa @@{elontwthfofisiseeini=~/../g}=(1,1..9);/il|a/?($@+=$**1e3**y/bit//,$*=0):/d/?($**=100):($*+=@@{/(..)/}.$%x/y/+/te|l/*10)for@F;$_=$@+$*;s/\B(?=(...)+$)/,/g
161.36 Greg Allen Wed Oct 9 18:33:45 2002
-pla s~b|ll|ho~$;+=$:*1e3**y/bid//~e?$:=0:($:+=(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/).=$?x y/d//for@F;$_=$:+$;;s/\d(?=(\d{3})+$)/$&,/g
161.41 Philippe Bricout Fri Oct 11 20:51:13 2002
-pl s!(.*?)(b|mi|tho)!"+($1)*1E".(4-length$2)*3!eg;s/ h/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index"x
^]\x8f/,\xec.'_^",pack'h2',$_)#eg;$_=eval;s/.(?=(...)+$)/$&,/g
pack, my love !
161.53 Alma Media Golf Team Wed Oct 9 18:58:42 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le us m b#){++$n;s/$i/+$n/g}s#.1[234]#)*10**(3*$&-33)+(#g;y#zyda-z #0000#d;$_=eval"($_)";s/..?.?(?=(...)+$)/$&,/g
162.36 Rick Klement Sat Oct 5 22:50:45 2002
-lp040 @={ontwthfofisiseeiniteel=~/../g}=1..$=;/^h/?$@*=100:!/a|io/?$@+=/ee./.@={/^../g}.$-x/y/+/lv/*10:($~+=$@*1e3**(3&1+ord),$@=0)}{$_=$@+$~;s/\B(?=(...)+$)/,/g
162.46 Josef Drexler Thu Oct 10 02:40:27 2002
-pal $r.=/tho|mi|b/?")*1E".3*(4-$+[0])."+(":/hu/?"E2":"+"./tee|lv/.index(zeontwthfofisiseeiniteel,/../&&$&)/2*10**/y/for@F;$_=eval"($r+0)";s/\d(?=(\d{3})+$)/$&,/g
slightly improving the commafier PS: Why am I not getting the email notifications? Is something broken?
162.52 Jeff Moore Mon Oct 7 22:21:06 2002
-pl for$z(@z=qw~b m tho $~){s~(.+)$z~~;$z+=/te|lv/.0+(/../+index onthfisenielztwfosiei,$&)%12*10**y~dy~~for$1=~/(?:\w| h)+/g}$_=sprintf',%03d'x4,@z;s~[0,]*(?!$)~~
162.58 Karsten Sperling Thu Oct 10 03:10:37 2002
-pal $,=($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,unpack+x8a,crypt$_,BJ)<0?$,-($=<-19?18+$=.0:$=):$=<4&&($"|=reverse$,,",000"x$=)?0:"$,00"for@F,ai;$_=reverse$"
162.59 Karsten Sperling Thu Oct 10 02:39:15 2002
-pal $,=($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,unpack+x8a,crypt$_,BJ)<0?$,-($=<-19?18+$=.0:$=):$=<4&&($"|=reverse$,,',000'x$=)?0:100*$,for@F,ai;$_=reverse$"
163.37 Greg Allen Wed Oct 9 18:10:56 2002
-pla (s~b|ll|ho~$;+=$:*1e3**y/bid//;$:=0~e
or$:+=(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10).$?x/y/+99*/hu/*$:)for@F;$_=$:+$;;s/\d(?=(\d{3})+$)/$&,/g
163.54 Michael Thelen Wed Oct 9 16:59:12 2002
-lp /^h|[mba]/?$s=3*index(hamb,$&)||$s+2:(s/..//,$t+=index(zeontwthfofisiseeiniteel,$&)/2+10*/te|lv/.0 x(/y/+$s))for reverse/\S+/g;$_=$t;1until!s/\d+(?=\d{3})/$&,/
Oops, missed an obvious, no-brainer improvement. I bet there are still a few more in there. :-)
163.59 Karsten Sperling Thu Oct 10 02:16:08 2002
-pal $,=($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,unpack+x8a,crypt$_,BJ)<0?$,-($=<-19?$=.0+180:$=):$=<4&&($"|=reverse$,,',000'x$=)?0:100*$,for@F,ai;$_=reverse$"
perldoc -f unpack
164.45 Wladimir Palant Mon Oct 7 18:15:33 2002
-lap /(..)./,thomilbil=~$&?($,+=$~*10**$+[0],$~=0):(zeontwthfofisiseeiniteel=~$1?$~+=$-[0]/2*10**/y/+10*/lv|een/:($~*=100))for(@F);$_=$,+$~;$,while s/\B\d{3}\b/,$&/
a bit better
164.55 Michael Thelen Wed Oct 9 16:54:11 2002
-lp /^h|[mba]/?$s=3*index(hamb,$&)||$s+2:(s/..//,$t+=index(zeontwthfofisiseeiniteel,$&)/2+10*/te|lv/.0 x/y/.0 x$s)for reverse/\S+/g;$_=$t;1until!s/\d+(?=\d{3})/$&,/
Hmm, a minor breakthrough. This looks much more reducible than my previous approach.
165.38 Greg Allen Wed Oct 9 17:49:12 2002
-pla for(@F){s~b|ll|ho~$;+=$:*1e3**y/bid//;$:=0~e
or$:+=(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/+99*/hu/*$:}$_=$:+$;;s/\d(?=(\d{3})+$)/$&,/g
165.40 Keith Calvert Ivey Sun Oct 6 05:06:23 2002
-lpa @v{elontwthfofisiseeini=~/../g}=(1,1..9);/il|a/?($t+=$n*1e3**(1+/b/+/i/),$n=0):/d/?($n*=100):($n+=@v{/(..)/}.$%x/y/+/te|l/*10)for@F;$_=$t+$n;s/\B(?=(...)+$)/,/g
165.50 Jeff Moore Mon Oct 7 18:36:07 2002
-pl for$z(@y=qw~b m tho $~){s~(.*)$z~~;$z+=(/te|lv/*20+/../+index'~ontwthfofisiseeini~~el',$&)/2*10**y~dy~~for$1=~/(?:\w| h)+/g}$_=sprintf",%03d"x4,@y;s~[0,]*(?!$)~~
165.52 BoB (Best of Breed - referees) Sat Oct 5 11:21:29 2002
-pal /hu/?$n*=100:/sa|mi|bi/?$n=!($s+=$n*1e3**(/o/+/i/+/b/)):(/../,$n+=index(zeontwthfofisiseeiniteel,$&)/2+10*/lv|een/.0 x/y/)for@F;$_=$s+$n;1while
s/\B\d{3}\b/,$&/
still only using mtv's solution
165.58 Karsten Sperling Thu Oct 10 01:27:39 2002
-pal $,=($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,substr+crypt($_,BJ),8,1)<0?$,-($=<-19?$=.0+180:$=):$=<4&&($"|=reverse$,,',000'x$=)?0:100*$,for@F,ai;$_=reverse$"
166.49 Jeff Moore Mon Oct 7 15:52:34 2002
-pl for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=/te|lv/*10+(/../+index"Dontwthfofisiseeinickel",$&)/2*10**y/dy//for$1=~/(?:\w| h)+/g;$s=~s/1/,/;$_.=$s}s/[0,]*(.)/$1/
I had nickel in one of my goes, too :)
166.57 Alexey Rudenko Thu Oct 10 11:44:00 2002
-lp $q=$2,s/((.*?)$1[a-z]*|(.*;))/$+$q/g while'z0 bi; mi; tho;;,1000tee+10 h00y0te10lv+10tw2el11th3fo4si6f5s7o1n9e8 +'=~/(.+?)([^a-z ;]+|;)/g;$_=join',',eval;s/,1/,/g
I don't understand it, but it certainly works
166.58 Karsten Sperling Thu Oct 10 01:17:27 2002
-pal $,=($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,substr+crypt($_,BJ),8,1)<0?$,-($=<-19?$=.0+180:$=):$=<4?($x|=reverse($,.',000'x$=),0):100*$,for@F,ai;$_=reverse$x
took me quite a while to notice that i could drop the entire post processing regex
168.40 Keith Calvert Ivey Sun Oct 6 04:05:51 2002
-lpa @v{elontwthfofisiseeini=~/../g}=(1,1..9);/il|a/?($t+=$n*1e3**(1+/b/+/i/),$n=0):/d/?($n*=100):($n+=@v{/(..)/}*(/y/*9+1)+/te|l/*10)for@F;$_=$t+$n;s/\B(?=(...)+$)/,/g
168.49 Josef Drexler Wed Oct 9 23:04:59 2002
-pal $r.=/tho|mi|b/?")*1E".3*(4-$+[0])."+(":/hu/?"E2":"+"./tee|lve/.index(zeontwthfofisiseeiniteel,/../&&$&)/2*10**/y/for@F;$_=eval"($r+0)";1while s/(\d+)(\d{3})/$1,$2/
Heureka! Got rid of the hash too. Nothing can stop me now...
168.51 Juho Snellman Sat Oct 5 22:23:17 2002
-pli9 for$a(b,X,X,m=>X,X,tho,hu,ty){s/(.*?)$a\S*/+($1)*1E$^I
/g;$^I--}s/een|lve/+10/g;s%(\pL.)\w+%+(index"zeontwthfofisiseeiniteel",$1)/2%g;$_=eval;s/.(?=(...)+$)/$&,/g
A 'g' was missing from the end of the last submission

Second place now; just 30 strokes behind Mtv.

169.38 Greg Allen Wed Oct 9 17:38:43 2002
-pla for(@F){s~b|ll|([hi]o)|hu~$:*=10**y/aehio//;$;+=$:,$:=0if$1~eg
or$:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/}$_=$:+$;;s/\d(?=(\d{3})+$)/$&,/g
and I thought commafication had been done to death in the newsgroups? the faq's version is pretty lousy
169.40 Keith Calvert Ivey Sun Oct 6 03:41:18 2002
-lpa @v{elontwthfofisiseeini=~/../g}=(1,1..9);/il|ho/?($t+=$n*1e3**(1+/b/+/i/),$n=0):/d/?($n*=100):($n+=@v{/(..)/}*(/y/*9+1)+/te|l/*10)for@F;$_=$t+$n;s/\B(?=(...)+$)/,/g
169.40 Michael Rybakin Sun Oct 6 21:59:40 2002
-ap /.../,$~+='thomilbil'=~/$&/?($^+="$~e$+[0]",-$~):/d/?$~*99:/een/+/lv/.(/y/?5:.5)*/../*index'..ontwthfofisiseeiniteel',$&for@F;$_=$~+$^.'
';s/...\b/,$&/while/\d{4}\b/
169.47 Philippe Bricout Fri Oct 11 20:25:41 2002
-pl s!(.*?)(b|mi|tho)!"+($1)*1E".(4-length$2)*3!eg;s/ h/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index-ontwthfofisiseeini__el,'\x7f\x7f'&$_)/2#eg;$_=eval;s/.(?=(...)+$)/$&,/g
1E3 < 1000 ;-)
169.55 Amir Karger Fri Oct 11 15:05:57 2002
-lp y/ /+/;for$=(qw/\+h b m tho lv|tee y z o tw th f1 f si s ei n t e E/){s/$=\w*/(qw(y.y E9 E6 E3 +t *t),0..11,"0)*1$&+(")[$;]/ge,$;++}$_=eval"($_)";s/\B(?=(...)+$)/,/g
Yes!!! (So tired...)
171.40 Keith Calvert Ivey Sun Oct 6 03:30:04 2002
-lpa @v{elontwthfofisiseeini=~/../g}=(1,1..9);/il|ho/?($t+=$n*1e3**(1+/b/+/i/),$n=0):/d/?($n*=100):($n+=/../*$v{$&}*(/y/?10:1)+/te|l/*10)for@F;$_=$t+$n;s/\B(?=(...)+$)/,/g
171.42 Danny Rathjens Thu Oct 10 04:41:46 2002
-lap y/mb/sn/,/../,$@+=zeontwthfofisiseeiniteel!~/$&/?$@*=50:($;=$-[0]/2,/y/?10*$;:/lv|een/?10+$;:/.{7}/?($n+=$@.0 x$;,-$@):$;)for@F;$_=$n+$@;1 while s/(?<=\w)\w{3}\b/,$&/
$@*10**$; -> $@.0 x$; argh, can't get bitwise solution to work and alternative commify solutions are bigger
171.47 Philippe Bricout Fri Oct 11 18:25:48 2002
-pl s!(.*?)(b|mi|tho)!"+($1)*10**".(4-length$2)*3!eg;s/ h/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index-ontwthfofisiseeini__el,'\x7f\x7f'&$_)/2#eg;$_=eval;s/.(?=(...)+$)/$&,/g
172.38 Greg Allen Wed Oct 9 17:29:16 2002
-pla for(@F){s~b|ll|([hi]o)|hu~$:*=10**y/aehio//;$;+=$:,$:=0if$1~eg
or$:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/}$_=$:+$;;s/(?<=\d)(?=(\d{3})+$)/,/g
DOH! -p of course
172.41 Danny Rathjens Wed Oct 9 05:32:47 2002
-lap y/mb/sn/,/../,$@+=zeontwthfofisiseeiniteel!~/$&/?$@*=50:($;=$-[0]/2,/y/?10*$;:/lv|een/?10+$;:/.{7}/?($n+=$@*10**$;,-$@):$;)for@F;$_=$n+$@;1 while s/(?<=\d)\d{3}\b/,$&/
I made it so prefix match only fails for hu(ndred) by moving eleven into ones bucket which allowed some consolidation. Now I have to figure a better way to commify.
172.42 Stephen Turner Sat Oct 5 20:57:02 2002
-pal @a[$x,3]=@a[3,$x=3-/us/-2*/ll/-/b/],($a[3]+=(/ne|fi|ev/+2*/^s|w/+3*/hi?r/+4*/^s|f/+8*/g|ni/+10*/te|el/)*10**/ty/)*=100**/d/for@F;$_=sprintf",%03d"x4,@a;s/^[0,]*(?=.)//
Saved another stroke. I'm not going to get close to Mtv this way though...

Why not? Only 25 strokes to go...

172.42 Keith Calvert Ivey Sat Oct 5 21:53:07 2002
-lpa @v{ontwthfofisiseeiniteel=~/../g}=1..11;/il|ho/?($t+=$n*1e3**(1+/b/+/i/),$n=0):/d/?($n*=100):($n+=/../*$v{$&}*(/y/?10:1)+/tee|lv/*10)for@F;$_=$t+$n;s/\B(?=(...)+$)/,/g
Exactly tied with Stephen. Wonder how long that'll last?
172.52 Amir Karger Fri Oct 11 05:06:24 2002
-lp y/ yz/+0/;for$=(qw/\+h b m tho lv|.?te l on w th fo f si s g n E./,""){s/$=[a-z]*/(qw(00 E9 E6 E3 +10),11,1..9,"0)*1$&+(")[$;]/ge,$;++}$_=eval"($_)";s/\B(?=(...)+$)/,/g
Famous last words... I luckily found a missing \n, but several hours of new breakthroughs got me nowhere. I really thought I had had an alien visitation...
172.52 Alma Media Golf Team Wed Oct 9 16:00:48 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le us m b hu#){++$n;s/$i/+$n/g}y#ya-z#0#d;s#.1[234]#)*10**(3*$&-33)+(#g;s# .15#00#g;$_=eval"0+($_)";s/..?.?(?=(...)+$)/$&,/g
173.43 Stephen Turner Sat Oct 5 17:17:02 2002
-pal @a[$x,3]=@a[3,$x=3-/us/-2*/ll/-/b/],($a[3]+=(/ne|fi|ev/+2*/^s|w/+3*/hi?r/+4*/^s|f/+8*/g|ni/+10*/te|el/)*10**/ty/)*=100**/hu/for@F;$_=sprintf",%03d"x4,@a;s/^[0,]*(?=.)//
One-stroke improvement in word-to-number code.

one stroke improvements on the first day!

173.54 Amir Karger Fri Oct 11 02:15:27 2002
-lp y/ yz/+0/;for$i(qw/\+h b m tho lv|.?te l on w th fo f si s g n E./,""){s/$i[a-z]*/(qw(00 E9 E6 E3 +10),11,1..9,"0)*1$&+(")[$c]/ge,$c++}$_=eval"($_)";
s/\B(?=(...)+$)/,/g
Breakthrough! Back into 16th place. More coming soon...(I think)
174.43 Stephen Turner Sat Oct 5 12:28:46 2002
-pal @a[$x,3]=@a[3,$x=3-/us/-2*/ll/-/b/],($a[3]+=(/ne|fi|ev/+2*/w/+3*/hi?r/+4*/f/+6*/^s/+8*/g|ni/+10*/te|el/)*10**/ty/)*=100**/hu/for@F;$_=sprintf",%03d"x4,@a;s/^[0,]*(?=.)//
The number can start with a comma if we're going to strip /^[0,]*/. This saves 7 strokes!

yikes, Bob had better start thinking again

174.47 Philippe Bricout Fri Oct 11 18:03:19 2002
-pl s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index-ontwthfofisiseeini__el,'\x7f\x7f'&$_)/2#eg;$_=eval;s/.(?=(...)+$)/$&,/g
174.51 Arne Georg Gleditsch Thu Oct 10 22:21:58 2002
-lp ($~='( h00bE9mE6thoE3tw2th3fo4se7ei8z0o1f5s6n9t10e)11y0een|lv+10 +')=~s/[+-E]+/push@_,$&;')|('/ge;s/\b($~.)/$_[$#--2]/g;s/E./0)*1$&+(0/g;$_=eval"($_)";s/\B(?=(...)+$)/,/g
175.41 Danny Rathjens Wed Oct 9 04:24:39 2002
-lap y/mb/sn/,/../,$;=zeontwthfofisiseeinite=~/$&/?$-[0]/2:1,$@+=/y/?10*$;:/el|een/?10+$;:/hu/?$@*=50:/.{7}/?($n+=$@*10**$;,-$@):$;for@F;$_=$n+$@;1 while s/(?<=\d)\d{3}\b/,$&/
?do{}: -> ?(): e(l|en) -> el|een $@*100-$@ -> $@*=50
175.45 Wladimir Palant Mon Oct 7 18:12:05 2002
-lap /(..)./,thomilbil=~$&?($,+=$~*10**$+[0],$~=0):(zeontwthfofisiseeiniteelhu=~$1,$-[0]>23?$~*=100:($~+=$-[0]/2*10**/y/+10*/lv|een/))for(@F);$_=$,+$~;$,while s/\B\d{3}\b/,$&/
first try
175.50 Michael Thelen Wed Oct 9 04:02:31 2002
-lp s/hu/00/g;s!\b[^ 0bm].!'+'.index(zeontwthfofisiseeiniteel,$&)/2!eg;/m/||s/b/bm/;s/.3o/,/||s/m/,,/;s/\w+(te|el)/1$&/g;y/ybma-z /0,,/d;s/[^,]+/$&/eeg;1until!s/,(?!\d{3})/,0/
Trying to shake things up a bit by creating expressions to be evaluated rather than just doing string manipulation. This seems somewhat promising for some reason...
175.51 BoB (Best of Breed - referees) Sat Oct 5 10:19:11 2002
-pal /hu/?$n*=100:/sa|mi|bi/?$n=!($s+=$n*1e3**(/o/+/i/+/b/)):(/../,$w=index(zeontwthfofisiseeiniteel,$&)/2,$w+=10*/lv|een/,$n+=$w.0 x/y/)for@F;$_=$s+$n;1while
s/\B\d{3}\b/,$&/
I expect mtv will beat this very shortly
175.51 Juho Snellman Sat Oct 5 19:31:52 2002
-pl $b=9;for$a(b,m=>tho,hu){s/(.*?)$a\S*/+($1)*1E$b
/g;$b-=3or$b=2}s/y/*10/g;s/een|lve/+10/g;s%(\pL.)\w+%+(index"zeontwthfofisiseeiniteel",$1)/2%g;$_=eval;s/.(?=(...)+$)/$&,/g
Do substitutions on the input, transforming it into a perl expression, eval the expression for the result, and group the result by thousands.
175.53 Amir Karger Thu Oct 10 19:30:50 2002
-lp y/ yz/+0/;for$i(qw/\+h b m tho lv|.?te l on w th fo f si s g n (.*?).(E.)/,""){s/$i[a-z]*/(qw(00 E9 E6 E3 +10),11,1..9,"+($1)*1$2")[$c]/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
And closer...
176.47 Jeff Moore Sun Oct 6 19:44:02 2002
-pl for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=(/te/*20+/../+index"Dontwthfofisiseeinickel",$&)/2*(/lv/*5+/d/*99+/y/*9+1)for$1=~/(?:\w| h)+/g;$s=~s/1/,/;$_.=$s}s/[0,]*(?!$)//
176.51 Arne Georg Gleditsch Thu Oct 10 22:19:57 2002
-lp ($~='( h00bE9mE6thoE3tw2th3fo4se7ei8z0o1f5s6n9t10e)11y0een+10lv+10 +')=~s/[+-E]+/push@_,$&;')|('/ge;s/\b($~.)/$_[$#--2]/g;s/E./0)*1$&+(0/g;$_=eval"($_)";s/\B(?=(...)+$)/,/g
177.46 Philippe Bricout Thu Oct 10 15:55:44 2002
-pl s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h\w+/00/g;y/y/0/;s#[a-z]+#$_=$&,'+'./te|lv/.(1+index-ontwthfofisiseeini__el,'\x7f\x7f'&$_)/2#eg;$_=eval;s/.(?=(...)+$)/$&,/g
Oops, sorry for the bad post before...

This one looks better :)

178.49 Michael Thelen Tue Oct 8 03:16:18 2002
-lp s!\b[^\Wbm].!index(zeontwthfofisiseeiniteel,$&)/2!eg;/m/||s/b/bm/;s/3o/,/||s/m/,,/;s/\.5|y(?! \d)/0/g;s/\w+(te|el)/1$&/g;y/bma-z -/,,/d;s/0(?=\d\d)//g;1while s/,(?!\d{3})/,0/
Combining, reducing, etc. etc.
178.52 Amir Karger Thu Oct 10 15:56:41 2002
-lp for$i(qw/\sh b m tho lv|.?te l y|z on w th fo f si s g n/,"(.*?) (E.)",$",""){s/$i[a-z]*/(qw(00 E9 E6 E3 +10),11,0..9,"+($1)*1$2","+")[$c]/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
Starting to bridge the gap. New algorithm needed?
179.42 Greg Allen Wed Oct 9 16:54:15 2002
-nla for(@F){s~(b|ll|([hi]o))|hu~$:*=$1?1e3:100;$;+=$:,$:=0if$2~eg
or$:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/}$_=$:+$;;1while
s/(?<=\d)\d{3}\b/,$&/;print
179.43 Michael Wrenn Fri Oct 11 20:52:50 2002
-lap map{s/te*n/+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla][^l]*/000/g&&s/\D*/)*1$'+(/;s/^(\w)[a-z]*/+$+/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,}\b)/$&,/g
An incremental tie-break edge. My last post? Will I remain Top 20? I will check the leaderboard the first chance I get! Thanks for a great contest! Lots of action!
179.44 Michael Wrenn Fri Oct 11 15:55:10 2002
-lap map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla][^l]*/000/g&&s/\D*/)*1$'+(/;s/(\w)[a-z]*/+$+/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,}\b)/$&,/g
Still 19th, but 15th is now 10 strokes away!
179.49 Jeff Moore Sun Oct 6 07:08:14 2002
-pl s/ h/h/g;s/lv|te/ ck/g;for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=(/../,1+index"Dontwthfofisiseeinickel",$&)/2*(/d/*99+/y/*9+1)for$1=~/\w+/g;$s=~s/1/,/;$_.=$s}s/[0,]*(?!$)//
I left out a /g on my previous submission; it'd fail for "twelve thousand twelve".
179.49 Jeff Moore Sun Oct 6 06:30:10 2002
-pl s/ h/h/g;s/lv|te/ ck/;for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=(/../,1+index"Dontwthfofisiseeinickel",$&)/2*(/hu/*99+/y/*9+1)for$1=~/\w+/g;$s=~s/1/,/;$_.=$s}s/[0,]*(?!$)//
179.53 Sheldon Fuchs Sat Oct 12 02:30:34 2002
-pl for$0(qw~^/( te|lv/+10 le/11 b|m|tho/)*10**$&+( hu/*100+ $/) w/2 th/3 fo/4 fi/5 m|si/6 se/7 g/8 b|in/9 ne/1 y|z/0+ [a-z\s]/ \+\)/) .+/$&/ee \d(?=(\d{3})+$)/$&,~){eval"s/$0/g"}
179.54 Josef Drexler Wed Oct 9 22:46:55 2002
-pal %p=qw(tho 3 m 6 b 9);$r.=/tho|m|b/?")*1E$p{$&}+(":/hu/?"E2":"+"./tee|lve/.index(zeontwthfofisiseeiniteel,/../&&$&)/2*10**/y/for@F;$_=eval"($r+0)";1while s/(\d+)(\d{3})/$1,$2/
even shorter with string concatenation and an explicit hash for the powers of 10
180.39 Greg Allen Wed Oct 9 13:42:45 2002
-nla for(@F){$;+=$:*1e3**@:if@:=/bi|ll|[hi]o/g;$:+=@:?$:=0:(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/+99*/hu/*$:}$_=$:+$;;1while s/^(\d+)(?=\d{3})/$1,/;print
180.42 Greg Allen Wed Oct 9 16:42:29 2002
-nla for(@F){s~(b|ll|([hi]o))|hu~$:*=$1?1e3:100;$;+=$:,$:=0if$2~eg
or$:+=(/.[nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/}$_=$:+$;;1while
s/^(\d+)(?=\d{3})/$1,/;print
180.44 Michael Wrenn Fri Oct 11 12:30:31 2002
-pal map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla]/000/g;s/.*?(00+).*/)*1$1+(/;s/(\w)[a-z]*/+$+/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,}\b)/$&,/g
Whew! I can't keep up with the climbers. I am working on Top 20 after 15th pulled away from me.
180.46 Michael Rybakin Sun Oct 6 00:05:04 2002
-ap map{/../;$n=index'zeontwthfofisiseeiniteel',$&;/.../;$r='thomilbil'=~/$&/?!($R+=$r.0 x$+[0]):/d/?$r*100:$r+(/y/?$n*5:/(een|lv)/.$n/2)}@F;$_=$r+$R.'
';s/...\D/,$&/while/\d{4}\D/
180.51 Amir Karger Thu Oct 10 15:24:57 2002
-lp for$i(qw/\sh b m ho lv|.?te l y|z on w th fo f si s g n/,"","(.*?) (E.)",$"){s/$i[a-z]*/(qw(00 E9 E6 E3 +10),11,0..9,"","+($1)*1$2","+")[$c]/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
Those pesky top players keep getting further away!

65 isn't that much..

181.43 Stephen Turner Sat Oct 5 11:58:30 2002
-pal @a[$x,3]=@a[3,$x=3-/us/-2*/ll/-/b/],($a[3]+=(/ne|fi|ev/+2*/w/+3*/hi?r/+4*/f/+6*/^s/+8*/g|ni/+10*/te|el/)*10**/ty/)*=100**/hu/for@F;$_=sprintf"%03d".",%03d"x3,@a;s/^[0,]*(?=.)//
Much improved word-to-number expression.
181.48 tanma Fri Oct 11 22:31:29 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni,te}=0..10;y/amb/369/;s/(.+?)\S*(\d)/+($1)*1:$+/g;s/ h/yy/g;s/el/onte/g;s/\b[a-z].|te/+$e{$&}/g;y/:ya-z/e0/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
181.50 Karsten Sperling Thu Oct 10 04:30:01 2002
-lp for$i(" h",qw{b m ho lv|.?te l y|z on w th fo f si s g n},"","(.*?) (E.)",$"){s/$i[a-z]*/(qw(00 E9 E6 E3 +10),11,0..9,"","+($1)*1$2","+")[$c]/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
My second time pulling ahead of someone by .01 points in the same day! Too bad I need ten fewer to make any more headway...
181.51 Karsten Sperling Wed Oct 9 23:10:07 2002
-pal $_=',000'x4;for$;(@F,ai){$,=($==5-index+fHlcC_pD5tmbz14vJr6dLQRyUE0ZFSkwi,substr+crypt($;,BJ),8,1)<0?$,-($=<-19?$=.0+180:$=):$=<5?$_|=sprintf"%*d",4*$=,$,:100*$,}s/[0,]*(?!$)//
tweaked sprintf
181.52 Alma Media Golf Team Wed Oct 9 15:46:58 2002
-pl for$i(qw#one w hi?r fo fi x se g in (te|lv) le us m b hu#){++$n;s/$i/+$n/g}s#y#*10#g;y/a-z//d;s#.1[234]#)*10**(3*$&-33)+(#g;s# .15#00#g;$_=eval"0+($_)";s/.{1,3}(?=(...)+$)/$&,/g
182.48 tanma Wed Oct 9 19:07:12 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni,te}=0..10;y/amb/369/;s/(.+?) \S*(\d)/+($1)*1:$2/g;s/ h/00/g;s/el/onte/g;s/\b[a-z].|te/+$e{$&}/g;y/:ya-z/e0/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
182.49 Michael Thelen Tue Oct 8 02:04:43 2002
-lp s!\b[^\Wbm].!index(zeontwthfofisiseeiniteel,$&)/2!eg;/m/||s/b/bm/;s/3o/,/||s/m/m,/;y/bm/,/;s/\.5|y(?! \w)/0/g;s/\w+(te|el)/1$&/g;y/-a-z //d;s/0(?=\d\d)//g;1while s/,(?!\d{3})/,0/
Starting to make a dent in the comma problem.
183.38 Greg Allen Wed Oct 9 09:59:56 2002
-nla for(@F){$;+=$:*1e3**$-if$-=/ll|ho/+/ll/+/bi/;$:+=$-?$:=0:(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/+99*/hu/*$:}$_=$:+$;;1while s/^(\d+)(?=\d{3})/$1,/;print
183.42 Prakash Kailasa Fri Oct 11 04:20:49 2002
-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...(,|$)/,$&/
183.52 Amir Karger Wed Oct 9 20:12:50 2002
-lp for$=(qw/hu b m ho (\w{3,})[tv]e y|z on|le w th fo f x v g ni te/,"",'00 (\d\d)','0 (\d)',$"){s/$=[a-z]*/(qw(00 E9+0 E6+0 E3+0),1,0..10)[$;].$1/ge,$;++}$_=eval;s/\B(?=(...)+$)/,/g
.02 points! (Couldn't resist.)
183.53 Sheldon Fuchs Wed Oct 9 18:03:47 2002
-pl for$~(qw~^/( te|lv/+10 le/11 b|m|tho/)*10**$&+( $/) m/6 w/2 th/3 b/9 hu/*100+ fo/4 fi/5 si/6 se/7 g/8 in/9 ne/1 y|z/0+ [a-z\s]/ \+\)/) .+/$&/ee \d(?=(\d{3})+$)/$&,~){eval"s/$~/g"}
183.54 Amir Karger Wed Oct 9 18:22:20 2002
-lp for$i(qw/hu b m ho (\w{3,})[tv]e y|z on|le w th fo f x v g ni te/,"",'00 (\d\d)','0 (\d)',$"){s/$i[a-z]*/(qw(00 E9+0 E6+0 E3+0),1,0..10)[$c].$1/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
At this rate, I should catch up to the next player in only five days...
184.40 Danny Rathjens Wed Oct 9 02:23:52 2002
-lap y/mb/sn/,/../,zeontwthfofisiseeinite=~/$&/,$;=$-[0]/2,$@+=/y/?10*$;:/e(l|en)/?10+($;||1):/hu/?$@*100-$@:/.{7}/?do{$n+=$@*10**$;;-$@}:$;for@F;$_=$n+$@;1 while s/(?<=\d)\d{3}\b/,$&/
I forgot I wasn't using strict, removed quotes and also shortened pattern for thousand,[mb]illion from [ih]o to .{7} I am still proud of y/mb/sn/ to get my 3,6,9
184.42 Michael Wrenn Wed Oct 9 23:07:12 2002
-pal map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla]/*1000/g&&s/.*?([\d*]+).*/)$++(/;s/(\w)[a-z]*/+$+/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,}\b)/$&,/g
Cut and Paste from my e-mail notification to keep up with Karsten!
184.43 Keith Calvert Ivey Sat Oct 5 15:47:00 2002
-lpa @v{zeontwthfofisiseeiniteel=~/../g}=0..11;for(@F){/il|ho/?($t+=$n*1e3**(/t/?1:/m/?2:3),$n=0):/d/?($n*=100):($n+=/../&&$v{$&}*(/y/?10:1)+/tee|lv/*10)}$_=$t+$n;s/\B(?=(\d{3})+$)/,/g
184.52 Karsten Sperling Wed Oct 9 22:39:40 2002
-pal $_=',000'x4;for$;(@F,ai){$,=($==4-index+fHlcCpD5tmbz14vJr6dLQRyUE0ZFSkwi,substr+crypt($;,BJ),8,1)<0?$,-($=<-19?$=.0+180:$=):$=<4?$_|=$"x4x$=.sprintf",%3d",$,:100*$,}s/[0,]*(?!$)//
artificial intelligence

makes a change from alien intelligence

184.57 Amir Karger Wed Oct 9 17:22:14 2002
-lp for$i(qw{hu b m ho (\w+)te wel y|z on w th fo f si s g ni te v},"",'00 (\d\d)','0 (\d)',$"){s/$i[a-z]*/(qw(00 E9+0 E6+0 E3+0),1,12,0..11)[$c].$1/ge,$c++}$_=eval;s/\B(?=(...)+$)/,/g
The squeezing continues...
185.43 Michael Wrenn Wed Oct 9 21:10:04 2002
-pal map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla]/*1000/g&&s/.*?([\d*]+).*/)$1+(/;s/(\w)[a-z]*/+$1/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
Finally up one spot!
185.44 Prakash Kailasa Thu Oct 10 21:22:24 2002
-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...(,|$)/,$&/
185.48 tanma Tue Oct 8 15:49:30 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni,te}=0..10;y/amb/369/;s/(.+?) \S*(\d)\S*/+($1)*1:$2/g;s/ h/yy/g;s/el/onte/g;s/\b[a-z].|te/+$e{$&}/g;y/:ya-z/e0/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
185.49 Eike Grote Sun Oct 6 10:01:53 2002
-lp s/hu/00/g;s/een/+10/g;s/wel/12/g;$_="\$_=( $_)";for$b(ho,mi,b){$k+=3,s/$b/)*1E$k+(/}for$u(zeontwthfofisiseeiniteel=~/../g){s/ $u/+$%/g,$%++}y/ya-z /0/d;eval;s/.+?(?=(\d{3})+$)/$&,/g
185.53 Amir Karger Wed Oct 9 15:53:57 2002
-lp for$=(qw{hu b m ho (\w*)te wel l y|z on w th fo f x v g n},"",'00 (\d\d)','0 (\d)',$"){s/$=[a-z]*/(qw(00 E9+0 E6+0 E3+0),"10 ",12,11,0..9)[$;].$1/ge,$;++}$_=eval;s/\B(?=(...)+$)/,/g
I saved a whole stroke and it doesn't even bump me up in the leaderboard?!

Now look, if everyone would gain a position for every removed stroke, where would Ton be now?

185.54 Sheldon Fuchs Wed Oct 9 17:47:58 2002
-pl for$~(qw~^/( te|lv/+10 le/11 b|m|tho/)*10**$&+( $/) m/6 w/2 th/3 b/9 hu/*100+ fo/4 fi/5 si/6 se/7 g/8 in/9 ne/1 y|z/0+ [a-z\s]/ \+\)/)~){eval"s/$~/g"}$_=eval;s/\d(?=(\d{3})+$)/$&,/g
186.38 Greg Allen Wed Oct 9 09:50:25 2002
-nla for(@F){$;+=$:*10**$-if$-=3*(/ll|ho/+/ll/+/bi/);$:+=$-?$:=0:(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/+99*/hu/*$:}$_=$:+$;;1while s/^(\d+)(?=\d{3})/$1,/;print
186.43 Michael Wrenn Wed Oct 9 20:53:14 2002
-pal map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;s/lv.*/o+10/;s/[bla]/*1000/g&&s/.*?([\d\*]+).*/)$1+(/;s/(\w)[a-z]*/+$1/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
Still swimming against the tide.
186.45 Karsten Sperling Wed Oct 9 20:55:26 2002
-pal $,-=-19>($==4-index+fCclHpD5tmbz14vJr6dLQRyUE0ZFSkwi,substr+crypt($_,BJ),8,1)?$=.0+180:$=>0?$,*($={$=}=$,.'000'x$=,$=>3?-99:1):$=for@F;$_=$={1}+$={2}+$={3}+$,;s/(?!^)(?=(...)+$)/,/g
hm. the crypt part seems ok, but math code is awful. not to mention the output...
186.47 Michael Thelen Tue Oct 8 01:09:42 2002
-lp s/\b[^\Wbm]./.5*index zeontwthfofisiseeiniteel,$&/eg;s/b/,/;s/.*m|,/$&,/g;s/3o/,/g||s/.*,/$&,/;s/\.5|y(?! \w)/0/g;s/\w+(te|el)/1$&/g;y/-a-z //d;s/0(?=\d\d)//g;1while s/,(?!\d{3})/,0/
Getting rid of more of those annoying substitutions. I need to get rid of all but one!
186.54 Amir Karger Tue Oct 8 19:29:49 2002
-lp for$i(qw{hu b m ho (\w*)te wel l y|z on w th fo f x v g n},"",'00 (\d\d)','0 (\d)',$"){s/$i[a-z]*/(qw(00 E9+0 E6+0 E3+0),"10 ",12,11,0..9)[$c].$1/ge,$c++}$_=eval;s/.(?=(...)+$)/$&,/g
The good news is: Woo-hoo! The bad news: I think this algorithm's on its last legs. Still, as usual, it went a lot farther than I expected.
187.40 Danny Rathjens Mon Oct 7 04:15:46 2002
-lap y/mb/sn/,/../,"zeontwthfofisiseeinite"=~/$&/,$;=$-[0]/2,$@+=/y/?10*$;:/e(l|en)/?10+($;||1):/hu/?$@*100-$@:/[hi]o/?do{$n+=$@*10**$;;-$@}:$;for@F;$_=$n+$@;1 while s/(?<=\d)\d{3}\b/,$&/
Using position of match on string is much more efficient than hash key for prefix lookup.
187.55 Sheldon Fuchs Wed Oct 9 06:48:36 2002
-pl for$~(qw~one/1 ^/( te|lv/+10 le/11 b|m|tho/)*10**$&+( $/) m/6 tw/2 th/3 b/9 hu/*100+ fo/4 fi/5 si/6 se/7 h/8 ni/9 y|z/0+ [a-z\s]/ \+\)/)~){eval"s/$~/g"}$_=eval;s/\d(?=(\d{3})+$)/$&,/g
188.38 Greg Allen Wed Oct 9 09:42:14 2002
-nla for(@F){$;+=$:*10**$-if$-=3*(/ll|ho/+/ll/+/bi/);($:+=$-?$:=0:(/[^u][nwvf]./+/w|f/+/th|f/*3+/s/*6+/[en]i/*8+/te|el/*10)*10**/y/)*=100**/hu/}$_=$:+$;;1while s/^(\d+)(?=\d{3})/$1,/;print
188.44 Prakash Kailasa Thu Oct 10 20:40:19 2002
-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...(,|$)/,$&/
188.44 Philippe Bricout Thu Oct 10 09:21:23 2002
-pl $[=1;s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h\w+/00/g;s#[a-z]+#$_=$&,/../,'+'.((index-ontwthfofisiseeiniBKel,$&)/2*(1+9*/y/)+10*/te|lv/)#eg;$_=eval;s/.(?=(...)+$)/$&,/g
190.46 Michael Wrenn Wed Oct 9 18:38:35 2002
-pal map{s/te*n/z+10/;s/fo/d/;y/ysieth/0/d;$p=1;for$d(qw(ou m b)){$p*=1e3;s/$d.*/)*$p+(/}s/l.*/o+10/;s/(\w)[a-z]*/+$1/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
Thanks for reviewing all these entries! I could post only a few, but I enjoy being part of the leaderboard activity.
190.50 Jeff Moore Sun Oct 6 03:41:53 2002
-pl sub f{/../,(1+index"zontwthfofisiseeiniteel",$&)/2}s/ h/h/g;for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=(/hu/?100*f:/y/?10*f:/lv|een/*10+f)for$1=~/\w+/g;$s=~s/./,/;$_.=$s}s/[0,]*(?!$)//
191.45 Philippe Bricout Thu Oct 10 09:15:25 2002
-pl $[=1;s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h\w+/00/g;s#[a-z]+#$_=$&,/../,$a=(index-ontwthfofisiseeiniBKel,$&)/2*(1+9*/y/)+10*/te|lv/,"+$a"#eg;$_=eval;s/.(?=(...)+$)/$&,/g
191.47 Michael Wrenn Wed Oct 9 18:13:43 2002
-pal map{s/te*n/z+10/;y/ysieth/0/d;s/fo/d/;$p=1;for$d(qw(ou m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/l.*/o+10/;s/(\w)[a-z]*/+$1/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
I'm still on the putting green ... and I'm not very good with my putter.
191.54 Amir Karger Tue Oct 8 19:05:48 2002
-lp @o=(qw(00 E9+0 E6+0 E3+0),"10 ",12,11,0..9);for$i(qw{hu b m ho (\w*)te wel l y|z on w th fo f x v g n},"",'00 (\d\d)','0 (\d)',$"){s/$i[a-z]*/$o[$c]$1/g,$c++}$_=eval;s/\d(?=(...)+$)/$&,/g
Wow, exactly tied with Arne. Not for for long!
192.52 Michiel van Leeuwen Fri Oct 11 22:40:21 2002
-apl map{s/ho|^m|^b/${$&}=$r;$r=0/e;$t=11;for$q qw(el te ni e se s fi f th tw o z){s/^$q/$t/;$t--}$r=($r+($_+/te|lv/*10)*10**/y/)*100**/hu/}@F;$_=sprintf",%03d"x4,$b,$m,$ho,$r;s/[0,]+//;$_||=0
Ok, one more char.
193.46 Michael Wrenn Wed Oct 9 17:55:16 2002
-pal map{s/te*n/+10/;y/ysieth/0/d;s/fo/d/;$p=1;for$d(qw(ou m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/l.*/o+10/;s/([a-z])[a-z]*/+$1/;y/zowrdfxvgn/0-9/;s/.u/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
I can't keep up! I'm falling down the leaderboard ...
193.46 Prakash Kailasa Thu Oct 10 14:36:04 2002
-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...(,|$)/,$&/
two chars and one step ahead this time ;-)

by 0.03

193.48 tanma Mon Oct 7 20:13:37 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni}=0..9;y/amb/369/;s/(.+?) \S*(\d)\S*/+($1)*1:$2/g;s/ h/*100/g;s/el/on+
10/g;s/te/+10/g;s/\b[a-z]./+$e{$&}/g;y/:ya-z/e0/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
193.49 Michael Thelen Tue Oct 8 00:51:09 2002
-lp s/\b[^\Wbm]./.5*index zeontwthfofisiseeiniteelhu,$&/eg;s/b/,/;s/.*m|,/$&,/g;s/3o/,/g||s/.*,/$&,/;s/y(?! \w)/0/g;s/12/00/g;s/\w+(te|el)/1$&/g;y/a-z //d;s/0(?=\d\d)//g;1while s/,(?!\d{3})/,0/
Rolling the 'twelve' special case together with the 'teen' cases for a six stroke gain.
193.49 TheodoreYoung Thu Oct 10 11:13:46 2002
-lp $"='|';@_{@_=qw/tho m b h twel z o tw th fo f si s ei n t e/}=(map(")*10**$_+(",3,6,9),'*100',map"+$_",12,0..11);s/een/+10/g;s/y/*10/g;s/(@_)\w*/$_{$1}/g;s/.+/"($&)"/ee;s/.(?=(...)+$)/$&,/g
193.52 Eike Grote Sun Oct 6 08:14:47 2002
-lp $_="\$_=( $_)";s/hu/00/g;s/ho/)*1E3+(/;s/m/)*1E6+(/;s/b/)*1E9+(/;s/een/+10/g;s/wel/12/g;for$u(zeontwthfofisiseeiniteel=~/../g){s/ $u/+$%/g,$%++}y/ya-z /0/d;eval;1while s/(\d+)(\d{3})/$1,$2/
193.52 Michiel van Leeuwen Fri Oct 11 22:33:26 2002
-apl map{s/ho|^m|^b/${$&}=$r;$r=0/e;$t=11;for$q qw(el te ni e se s fi f th tw o z){s/^$q/$t/;$t--}$r=($r+($_+/te|lv/*10)*10**/y/)*100**/hu/}@F;$_=sprintf",%03d"x4,$b,$m,$ho,$r;s/^[0,]+//;$_||=0
What trick(s) did I miss?
194.45 Philippe Bricout Wed Oct 9 22:45:00 2002
-pl $[=1;s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h\w+/*100/g;s#[a-z]+#$_=$&,/../,$a=(index zontwthfofisiseeiniBKel,$&)/2*(1+9*/y/)+10*/te|lv/,"+$a"#eg;$_=eval;s/.(?=(...)+$)/$&,/g
$[ ? Its use is highly discouraged.

My perl5 pocket reference says: Do not use - but hey!, this is golf!

195.42 Michael Rybakin Sat Oct 5 17:32:57 2002
-lp map/.../*'thomilbil'=~/$&/?($R+=$r.0 x$+[0],$r=0):(/../,'zeontwthfofisiseeiniteel'=~/$&/,$n=$-[0],/d/?$r*=100:$r+=/y/?$n*5:/(een|lv)/*10+$n/2),/\w+/g;$_=$r+$R;1while+s/(\d)(...)(?:$|,)/$1,$2/
195.46 Prakash Kailasa Thu Oct 10 13:33:25 2002
-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}(,|$)/,$&/
one day, one character?
195.47 Philippe Bricout Wed Oct 9 22:27:28 2002
-pl s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;s/ h\w+/*100/g;s#[a-z]+#$_=$&,/../,$a=int((index zeontwthfofisiseeiniBKel,$&)/2)*(1+9*/y/)+10*/te|lv/,"+$a"#eg;$_=eval;s/.(?=(...)+$)/$&,/g
input : one hundred five output : yeepee :)
195.50 BoB (Best of Breed - referees) Sat Oct 5 09:27:27 2002
-pal /hu/?$n*=100:/sa|mi|bi/?$n=!($s+=$n*1e3**(/o/+/i/+/b/)):(/../,$w=index(zeontwthfofisiseeini,$&)/2,/ten|lev|elv/g&&($w=7+pos),$w+=10*/een/,$n+=$w.0 x/y/)for@F;$_=$s+$n;1while
s/\B\d{3}\b/,$&/
clawing our way back to the top
195.50 TheodoreYoung Tue Oct 8 15:09:53 2002
-lp $"='|';@_{@_=qw/tho m b h twel z o tw th fo f si s ei n t e/}=(map(")*10**$_+(",3,6,9),'*100',map("+$_",12,0..11));s/een/+10/g;s/y/*10/g;s/(@_)\w*/$_{$1}/g;$_=eval"($_)";s/.(?=(...)+$)/$&,/g;
195.53 Amir Karger Tue Oct 8 18:32:03 2002
-lp @o=(qw(00 E9+0 E6+0 E3+0),"10 ",12,11,0..9);for$i(" h",qw{b m ho (\w*)te wel l y|z on w th fo f x v g n},a..z,'00 (\d\d)','0 (\d)',$"){s/$i[a-z]*/$o[$c]$1/g,$c++}$_=eval;s/\d(?=(...)+$)/$&,/g
Squeeeeeeze - and we're under 200! I knew I'd eventually be able to get rid of a few of the letters, but it's amazing how few bits can describe the numbers 1..10!
195.53 Michiel van Leeuwen Fri Oct 11 17:30:46 2002
-apl map{s/ho|^m|^b/${$&}=$r;$r=0/e;$t=12;for$q qw(twel el te ni e se s fi f th tw o z){s/^$q/$t/;$t--}$r=($r+($_+/te/*10)*10**/y/)*100**/hu/}@F;$_=sprintf",%03d"x4,$b,$m,$ho,$r;s/^[0,]+//;$_||=0
Why didn't I see this () before? So easy....
195.53 Arne Georg Gleditsch Mon Oct 7 06:33:13 2002
-l $_='( h00bE9mE6thoE3twel12tw2th3fo4seve7ei8z0o1f5s6n9t10e)11y0een+10 +';%d=/[ a-z]+|[+-E]+/g;tr/+-E/|/s;$c=$_;$_=<>;s/(\b$c)|./$d{$1}/g;s/E./0)*1$&+(0/g;$_=eval"($_)";s/\B(?=(...)+$)/,/g;print
195.55 Sheldon Fuchs Wed Oct 9 06:41:00 2002
-pl for$~(qw~one/1 ^|on|and/$&( te|lv/+10 le/11 b|m|tho/)*10**$&+ $/) m/6 tw/2 th/3 b/9 hu/*100+ fo/4 fi/5 si/6 se/7 h/8 ni/9 y|z/0+ [a-z\s]/ \+\)/)~){eval"s/$~/g"}$_=eval;s/\d(?=(\d{3})+$)/$&,/g
196.31 Benoît Chauvet Thu Oct 10 09:00:11 2002
-pla @,{'JZ^X\xbc\xaaT)^Q\xb2O\x87\x97kp\xe9^H\xd5Q^\xb3\xa44"A^V\x8a\x9f\xf2\xfcn\xf1'=~/./g}=(1..20,map$_.0,3..10,1E5,100,1E8);map{$,=$,{$_=chr 8*/n/+unpack'%8C*',$_};$*=y!\xfcn\xf1!!?!($;+=$**$,):/\xf2/?$**$,:$*+$,}@F}{$_=$*+$;;s;.(?=(...)+$);$&,;g
Improved tiebreak (but not lisibility, I'm afraid !)
196.37 Benoît Chauvet Thu Oct 10 07:47:26 2002
-pla @a{'JZ^X\xbc\xaaT)^Q\xb2O\x87\x97kp\xe9^H\xd5Q^\xb3\xa44"A^V\x8a\x9f\xf2n\xfc\xf1'=~/./g}=(1..20,map$_.0,3..10,100,1E5,1E8);map{$b=$a{$_=chr 8*/n/+unpack'%8C*',$_};$s=/[\xfcn\xf1]/?!($c+=$b*$s):/\xf2/?$b*$s:$b+$s}@F}{$_=$s+$c;s/.(?=(...)+$)/$&,/g
broke the 200 barrier. That was a fair goal...
196.49 Prakash Kailasa Wed Oct 9 21:17:40 2002
-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}(,|$)/,$&/
196.49 tanma Wed Oct 9 19:43:13 2002
-pl s/ h/yy/g;s/te|el/j/g;y/ambsieth/369/d;s/fo/u/g;s/jv/oj/g;s/(.+?) \S*(\d)/+($1)*1:$2/g;s/\b.|y|j/\U$&/g;y/ZOWRUFXVGN/0-9/;s/\d/+$&/g;s/J/+10/g;y/:Ya-z/e0/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
196.52 Arne Georg Gleditsch Sun Oct 6 21:56:38 2002
-l $_='( h00bE9mE6thoE3tw2th3fo4seve7ei8z0o1f5s6n9t0e)1 +(y0en+10lve+10)';%d=/[ a-z]+|[+-E]+/g;tr/+-E/|/s;$c=$_;$_=<>;s/(\b$c\b)|./$d{$1}/g;s/E./0)*1$&+(0/g;$_=eval"($_)";s/\B(?=(...)+$)/,/g;print
197.37 Isaac Lin Thu Oct 10 18:10:39 2002
-pl map{for$.(o,tw,th,fo,fi,'si|m',se,ei,'n|b',te,el){$~=$-if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:/^h/?$^*=100:($:+=$^*10**$~,$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Detect "hundred" more directly, thus the variable used to save the index variable does not need to be cleared.
197.46 Michael Wrenn Tue Oct 8 21:50:44 2002
-pal map{y/ysie/0/d;s/th/j/;s/fo/d/;s/tn/+10/;$p=1;for$d(qw(jo m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/l.*/o+10/;s/([a-z])[a-z]*/+$1/;y/zotjdfxvgn/0-9/;s/.h/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
What's the difference between an alien and an earthling? About 80 strokes! Make that 79 ...
197.50 Mtv Europe Sat Oct 5 08:26:29 2002
-pal /hu/?$n*=100:/sa|mi|bi/?$n=!($s+=$n*1e3**(/o/+/i/+/b/)):(/../,$w=index(zeontwthfofisiseeini,$&)/2,/ten|lev|elv/g&&($w=7+pos),$w+=10*/een/,$n+=$w.=0
x/ty/)for@F;$_=$s+$n;1while
s/\B\d{3}\b/,$&/
197.50 TheodoreYoung Tue Oct 8 14:30:23 2002
-lp $"='|';@_{@_=qw/tho m b h twel z o tw th fo f si s ei n t e/}=(map(")*10**$_+(",3,6,9),'*100',map("+$_",12,0..11));s/een/+10/g;s/y/*10/g;s/(@_)\w*/$_{$1}/g;$_=eval"($_)";s/(.)(?=(...)+$)/$1,/g;
198.45 Michael Wrenn Tue Oct 8 20:41:19 2002
-pal map{y/ysie/0/d;s/th/j/;s/fo/d/;s/tn/+10/;$p=1;for$d(qw(jo m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/l.*/o+10/;s/([a-z])[a-z]*/+$1/;y/zotjdfxvgn/0-9/;s/\+h/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
I'm in the fairway, but it is still a long way to the hole. What is par on this one anyway? Maybe the refs can predict difficulty by setting par at the start.

Refs always overestimate anyway :) - My guess was 150 or so.

198.50 Prakash Kailasa Wed Oct 9 21:03:43 2002
-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/
198.52 Michiel van Leeuwen Fri Oct 11 15:11:16 2002
-apl map{s/ho|^m|^b/${$&}=$r;$r=0/e;$t=12;for$q qw(twel el te ni e se s fi f th tw o z){s/^$q/$t/;$t--}$r=($r+($_+/te/*10)*10**/y/)*100**/hu/}@F;$_=sprintf(",%03d"x4,$b,$m,$ho,$r);s/(0*,?)*//;$_||=0
yeah! less than 200!

told you

199.37 Isaac Lin Thu Oct 10 14:58:57 2002
-pl map{for$.(o,tw,th,fo,fi,'si|m',se,ei,'n|b',te,el,h){$~=$-if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:$~>9?$^*=100:($:+=$^*10**$~,$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Changed encoding so it does not need to be mod 12.

if you submit again in the next 30 seconds, you are banned from the competition :)

199.49 Eike Grote Sat Oct 5 22:00:28 2002
-lp $_="\$_=( $_)";s/hu/00/g;s/ho/)*1E3+(/;s/m/)*1E6+(/;s/b/)*1E9+(/;s/een/+10/g;y/y/0/;s/wel/12/g;for$u(z,o,tw,th,fo,fi,si,se,ei,n,te,el){s/ $u/+$%/g,$%++}y/a-z //d;eval;1while s/(\d+)(\d{3})/$1,$2/
We are below two hundred strokes :-)
199.50 Michael Thelen Tue Oct 8 00:39:44 2002
-lp s/\b[^\Wbm]./.5*index zeontwthfofisiseeiniteelhu,$&/eg;s/b/,/;s/.*m|,/$&,/g;s/3o/,/g||s/.*,/$&,/;s/y(?! \w)/0/g;s/12/00/g;s/\w+te/1$&/g;s/2el/12/g;y/a-z //d;s/0(?=\d\d)//g;1while s/,(?!\d{3})/,0/
Yay! Under 200!
200.47 tanma Mon Oct 7 17:39:11 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni}=0..9;y/amb/369/;s/(.+?) \S*(\d)\S*/+($1)*1:$2/g;s/ h/*100/g;s/el/on+10/g;s/y/*10/g;s/te/+10/g;s/\b[a-z]./+$e{$&}/g;y/:a-z/e/d;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
201.37 Isaac Lin Thu Oct 10 14:47:18 2002
-pl map{for$.(o,tw,th,fo,fi,'si|m',se,ei,'n|b',te,el,h){$~=$-%12if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:!$~?$^*=100:($:+=$^*10**$~,$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Optimized regexp to check for six or million.

5 in 30 minutes. I don't expect this on day 5.

201.54 Michiel van Leeuwen Fri Oct 11 14:38:12 2002
-apl map{s/ho|mi|bi/${$&}=$r;$r=0/e;$t=12;for$q qw(twel el te ni ei se s fi f th tw o z){s/^$q/$t/;$t--}$r=($r+($_+/te/*10)*10**/y/)*100**/hu/}@F;$_=sprintf(",%03d"x4,$bi,$mi,$ho,$r);s/(0*,?)*//;$_||=0
two more to go! You can do it!
202.37 Isaac Lin Thu Oct 10 14:43:09 2002
-pl map{for$.(o,tw,th,fo,fi,'[sm]i',se,ei,'n|b',te,el,h){$~=$-%12if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:!$~?$^*=100:($:+=$^*10**$~,$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Changed encoding so thousand, million, and billion are mapped to 3, 6, and 9.
202.42 Stephen Turner Sat Oct 5 11:26:56 2002
-pal 
@a[$x,3]=@a[3,$x=3-/us/-2*/ll/-/b/],($a[3]+=(/one/+2*/w/+3*/hi?r/+4*/f/+/fi/+6*/x/+7*/ev/+8*/g/+9*/ni/+4*/el/+6*/lv/+10*/te/)*10**/ty/)*=100**/hu/for@F;$_=sprintf"%03d".",%03d"x3,@a;s/^[0,]*(?=.)//
Work harder in main string-to-number expression so that it assigns 0 to hundred, thousand, million and billion. Then allows combining expressions in shorter ways.

good idea.. hmmmmm

203.50 TheodoreYoung Tue Oct 8 14:16:38 2002
-lp $"='|';@_{@_=qw/tho m b h twel z o tw th fo f si s ei n t e/}=(map(")*10**$_+(",3,6,9),'*100',map("+$_",12,0..11));s/een\b/+10/g;s/y\b/*10/g;s/\b(@_)\w*/$_{$1}/g;$_=eval"($_)";s/(.)(?=(...)+$)/$1,/g;
Just some "refactoring".
204.37 Scott Hall Sat Oct 12 03:57:37 2002
-alp $,=join"|",%,=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%@=(ho,1,'m',6,b,9);map{/$,/;$;+=$,{$&}*10**/y/+10*/te|el/;$;*=100**/d/;/ho|m|b/and$;*=10**$@{$&},$:+=$;,$;=0}@F;$_=$;+$:;s!.(?=(...)+$)!$&,!g
Better tiebreak It's also harder to read :)

You still have an hour to get below 200

204.39 Isaac Lin Thu Oct 10 14:29:07 2002
-pl map{for$.(o,tw,th,fo,fi,si,se,ei,n,te,el,h,tho,mi,b){$~=$-%12if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:!$~?$^*=100:($:+=$^.'000'x$~,$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Replaced multiplication by 10**(# of zeros) with '000'x# of multiples of thousand.

three submissions in 10 minutes, gaining 4 characters!

204.48 Scott Hall Sat Oct 12 03:26:37 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/+10*/te|el/;$t*=1e2**/d/;/ho|m|b/and$t*=10**$m{$&},$u+=$t,$t=0}@F;$_=$t+$u;s!.(?=(...)+$)!$&,!g
205.43 Danny Rathjens Sun Oct 6 21:19:28 2002
-lap $d{$_}=++$%for qw(on tw th fo fi si se ei ni te);y/mb/sn/,/^../,$;=$d{$&},$@+=/y/?10*$;:/e(l|en)/?10+($;||1):/hu/?$@*100-$@:/[hi]o/?do{$n+=$@*10**$;;-$@}:$;for@F;$_=$n+$@;1 while s/(?<=\d)\d{3}\b/,$&/
?:?:?:?: is fun, plus a whopping one stroke improvement on commify from perlfaq5 by using regex blackmagic! 8^)
205.48 Michael Thelen Wed Oct 9 16:20:15 2002
-lp for(reverse split){/^h|a|m|b/?$s=(3*index'hamb',$&)||$s+2:${$a=/^../&&index(zeontwthfofisiseeiniteel,$&)/2;/tee|lv/&&($a+=10);/y/&&($a.=0);($a>=0)&&($t+=($a.(0 x$s)));}}$_=$t;1until!s/\d+(?=\d{3})/$&,/
The first step in a new line of questioning.
206.38 Isaac Lin Thu Oct 10 14:20:44 2002
-pl map{for$.(o,tw,th,fo,fi,si,se,ei,n,te,el,h,tho,mi,b){$~=$-%12if$-++,/^$./}(/y/?$~.=0:/een|lv/?$~+=10:!/d|ll/)?$^+=$~:!$~?$^*=100:($:+=$^*10**($~*3),$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Removed extra "e" from regexp to detect numbers in the teens.

that 't' was a funny looking 'e'

206.46 tanma Mon Oct 7 16:27:51 2002
-pl @e{ze,on,tw,th,fo,fi,si,se,ei,ni}=0..9;y/amb/369/;s/\S*(\d)\S*/)*1:$+
/g;s/ h/*100/g;s/el/on+10/g;s/y/*10/g;s/te/+10/g;s/\b[a-z]./+$e{$&}/g;y/:a-z/e/d;s/.*\)/+($&/g;$_=eval
;pos=y///c%3||3;s/\G.../,$&/g
206.48 Scott Hall Sat Oct 12 03:16:58 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/+10*/te|el/;$t*=1e2**/d/;/ho|m|b/and$t*=10**$m{$&},$u+=$t,$t=0}@F;$_=$t+$u;s!.(?=(\d{3})+$)!$&,!g
207.39 Isaac Lin Thu Oct 10 14:19:12 2002
-pl map{for$.(o,tw,th,fo,fi,si,se,ei,n,te,el,h,tho,mi,b){$~=$-%12if$-++,/^$./}(/y/?$~.=0:/teen|lv/?$~+=10:!/d|ll/)?$^+=$~:!$~?$^*=100:($:+=$^*10**($~*3),$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Rearranged encoding so "thousand", "million", and "billion" will map to 1, 2, and 3, to simplify converting to a number.
208.38 Isaac Lin Tue Oct 8 20:46:21 2002
-pl map{for$.(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b){$~=$-%10if$-++,/^$./}(/y/?$~.=0:/te?en|el/?$~+=10:!/d|l/)?$^+=$~:$~<3?$^*=100:($:+=$^*10**($~*3-6),$^=0);$-=0}split;$_=$:+$^;1while s/(\d+)(\d{3})/$1,$2/
Removing alphanumerics to improve tiebreaker score
208.39 BoB (Best of Breed - referees) Sat Oct 5 08:04:48 2002
-lp sub g{$r=9;"@_"=~$_?last:$r--for in,g,se,x,fi,f,th,w,'^o|l';$r}for$a(b,mi,tho,'$'){s#(.*?) ?((\w*) h\S+ ?)?((\w*(te|el)\w*)|(\w+y ?)?(\w*)) ?$a\S*|(.*,)#$1.$9.g($3).($5?1:g$7).g($5.$8).','#e}s/^0+\B|.$//g
Eugene's solution.
208.43 gimbo Thu Oct 10 23:09:32 2002
-lap map{$.=0;$_=$.+=20..80?10:1for@t{'l\xbe\0^D\xbc\x94\x83\xe1\x84\x87?WaB3J\xb9\xcd^Rw(pZA\xa04\xa9$^PPE"RL\xc7'=~/./g};$.=$.*3+ord for//g;$s=($n=$t{chr$.%248})<91?$s+$n:$s.0 x($n-89);$t+=$s,$s=0if$n>91}@F;$_=$t+$s;1while s/(\d)(...($|,))/$1,$2/
208.46 Michael Wrenn Tue Oct 8 19:27:30 2002
-lpa map{y/y/0/;s/th/x/;s/fo/d/;s/sev/q/;s/el/o/;s/[etv]en|ove/+10/;$p=1;for$d(qw(xo m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/([a-z])[a-z]*/+$1/;y/zotxdfsqen/0-9/;s/\+h/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
One stroke at a time.
208.47 Isaac Lin Mon Oct 7 17:06:34 2002
-pl map{for$i(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b){$a=$j%10if$j++,/^$i/}(/y/?$a.=0:/te?en|el/?$a+=10:!/d|l/)?$b+=$a:$a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0);$j=0}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
Removed extraneous () around else clause for last ?:
208.50 Prakash Kailasa Wed Oct 9 17:56:45 2002
-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/
208.51 Michiel van Leeuwen Sun Oct 6 13:55:00 2002
-apl map{s/ho|mi|bi/${$&}=$r;$r=0/e;for$q qw(z o tw th fo f si s ei n te el){s/^$q/$t/;$t++};$t=s/.*lv/12/;$r+=($_+/tee/*10)*10**/y/;$r*=100**/hu/;}@F;$_=sprintf(",%03d"x4,$bi,$mi,$ho,$r);s/(0*,?)*//;s/^$/0/;
Getting close to the 200 barrier. Like that wil help me win :-(

At least you're equal with the original BoB now

209.38 Benoît Chauvet Wed Oct 9 22:28:44 2002
-pla @a{'\xc0JZ^X\xbc\xaaT)^Q\xb2O\x87\x97kp\xe9^H\xd5Q^\xb3\xa44"A^V\x8a\x9fn\xfc\xf1'=~/./g}=(0..20,map{10*$_}3..9,1E2,1E5,1E8);map{$_=chr(8*/n/+unpack"%8c*",$_);if(/n|\xfc|\xf1/){$c+=$a{$_}*$s;$s=0}else{$s+=/\xf2/?99*$s:$a{$_}}}@F}{$_=$s+$c;s/.(?=(...)+$)/$&,/g
Waou, first try for it, and first hole since (too?) many months...
209.43 gimbo Thu Oct 10 22:59:30 2002
-lap map{$.=0;$_=$.+=20..80?10:1for@t{'l\xbe\0^D\xbc\x94\x83\xe1\x84\x87?WaB3J\xb9\xcd^Rw(pZA\xa04\xa9$^PPE"RL\xc7'=~/./g};$.=$.*3+ord for/./g;$s=($n=$t{chr$.%248})<91?$s+$n:$s.0 x($n-89);$t+=$s,$s=0if$n>91}@F;$_=$t+$s;1while s/(\d)(...($|,))/$1,$2/
209.44 Michael Rybakin Sat Oct 5 13:20:19 2002
-lp map{/../;'zeontwthfofisiseeiniteel'=~/$&/;$n=$-[0]/2;/.../;if('thomilbil'=~/$&/){$R+=$r*10**$+[0],$r=0}else{/d/?$r*=100:$r+=/y/?$n*10:/(een|lv)/?$n+10:$n}}/\S+/g;$_=$r+$R;1while+s/(\d)(\d{3})($|,)/$1,$2$3/
209.46 Michael Wrenn Tue Oct 8 18:26:47 2002
-lpa map{y/y/0/;s/tw/x/;s/fo/d/;s/sev/q/;s/el/o/;s/[etv]en|ove/+10/;$p=1;for$d(qw(tho m b)){$p*=1e3;s/$d\w+/)*$p+(/}s/([a-z])[a-z]*/+$1/;y/zoxtdfsqen/0-9/;s/\+h/*100/}@F;$_=eval"(@F)";s/.(?=(...){1,3}\b)/$&,/g
What on earth are those leaders doing to drop 100 strokes? Oh wait, they're not on earth. I forgot.
210.46 Isaac Lin Mon Oct 7 14:33:01 2002
-pl map{for$i(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b){$a=$j%10if$j++,/^$i/}(/y/?$a.=0:/te?en|el/?$a+=10:!/d|l/)?$b+=$a:($a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0));$j=0}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
Combining first nested ?: operator with the second one. The second if grouping is true if not "hundred", "thousand", "million", or "billion", so it can be combined with the first if grouping, which checks for "ten", "teen", and "y". Combining the checks allows the check for "million" and "billion" to be simplified to a check for "l", since the only other number with "l" is eleven, which has already been screened out.

all that for a 1 character improvement! :)

210.55 Amir Karger Tue Oct 8 17:58:19 2002
-lp @i=(" h",qw{b m tho (\w+)te twel z|ty on tw th fo f si s ei ni t el},'00 (\d\d)','0 (\d)',$");@o=(qw(00 E9+0 E6+0 E3+0),"10 ",12,0..11);for$c(0..20){s/($i[$c])[a-z]*/$o[$c]$2/g}$_=eval;s/\d(?=(...)+$)/$&,/g
Take that Yanick! Pretty amazing what a change of algorithm can do for you. I avoided commifying until I found a 20 rather than 31-character solution.
210.58 tinita Sat Oct 12 01:26:28 2002
-lp @\xa7=(qw{?y ?e.n h z o .wo|.wen th[^o] fo f si s ei n te e tw t m b *10 +10
*100},(map"+".$_,0..12),map")*1e$_+(",3,6,9);s/\b$\xa7[$\xa7++]\w*/$\xa7[$\xa7+18]/gwhile$\xa7<19;$_=reverse
eval"($_)";$_=reverse
join",",/..?.?/g
just working on the tiebreak... =(
210.62 tinita Wed Oct 9 08:31:49 2002
-lp @_=(qw{?y ?een h z o two|twen th[^o] fo f si s ei n te e tw t m b *10
+10 *100},(map"+".$_,0..12),map")*1e$_+(",3,6,9);s/\b$_[$i++]\w*/$_[$i+18]/gwhile$i<19;$_=reverse
eval"($_)";$_=reverse
join",",/..?.?/g
211.44 Josef Drexler Wed Oct 9 22:05:19 2002
-pal $p{$_}=++$b*3for@p=(tho,mi,b);$"="|",$_=/@p/?")*1E$p{$&}+(":/hu/?"E2":(/../,$,=index(zeontwthfofisiseeiniteel,$&)/2,/y/?$,*=10:$,+=10*/tee|lve/,"+$,")for@F;$"="";$_=eval"(@F+0)";1while s/(\d+)(\d{3})/$1,$2/
string index instead of hash is shorter... and I got rid of unneeded parentheses.
211.47 Isaac Lin Mon Oct 7 13:57:06 2002
-pl map{for$i(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b){$a=$j%10if$j++,/^$i/}/y/?$a.=0:/te?en|el/?$a+=10:0;!/d|ll/?$b+=$a:($a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0));$j=0}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
Replacing *=10 with .=0
211.47 Michael Wrenn Tue Oct 8 15:21:13 2002
-lp y/y/0/;s/tw/x/g;s/fo/d/g;s/sev/q/g;s/el/o/g;s/[etv]en|ove/+10/g;$p++;for$d(qw(tho m b)){$p*=1e3;s/$d\w+/)*$p+(/g}s/\b([a-z])[a-z]*/+$1/g;y/zoxtdfsqen/0-9/;s/\+h/*100/g;$_=eval"($_)";s/.(?=(...){1,3}\b)/$&,/g
Why didn't I think of that sooner? I may break 200 yet!
211.49 Prakash Kailasa Wed Oct 9 16:54:31 2002
-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/
211.50 Scott Hall Sat Oct 12 02:35:42 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/+10*/te|el/;$t*=1e2**/d/;/ho|m|b/and$t*=10**$m{$&},$u+=$t,$t=0}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
211.60 Yanick Champoux Wed Oct 9 15:46:38 2002
-pl for(reverse
split){$y.=0
x(/ed/*(2-($i=length$y)%3)+/y/*!($i%3)or
3*/b|a/+6*/io/-$i);for$i(%n=z0one1wo2hr3fo4fi5x6se7g8ni9ten01le11lv21wen2ir3een1=~/\d+|\D+/g){$y.=$n{$i}x/$i/}}$y=~s/...\B/$&,/g;$_=reverse$y
A little waltzing around...
212.47 Isaac Lin Sun Oct 6 19:22:37 2002
-pl map{for$i(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b){$a=$j%10if$j++,/^$i/}/y/?$a*=10:/te?en|el/?$a+=10:0;!/d|ll/?$b+=$a:($a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0));$j=0}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
212.49 Scott Hall Fri Oct 11 03:01:37 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/+10*/te|el/;$t*=1e2**/d/;/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
212.59 Yanick Champoux Tue Oct 8 22:08:57 2002
-pl for(reverse
split){map$y.=0
x$_,3*/b|a/+6*/io/-($i=length$y),/ed/*(2-($i%=3))+/y/*!$i;for$i(%n=z0one1wo2hr3fo4fi5x6se7g8ni9ten01le11lv21wen2ir3een1=~/\d+|\D+/g){$y.=$n{$i}x/$i/}}$y=~s/...\B/$&,/g;$_=reverse$y
Sinking deeper and deeper in code depravation...
212.62 tinita Tue Oct 8 22:47:00 2002
-lp @_=(qw{?ty ?teen h z o two|twen th[^o] fo f si s ei n te e tw t m b *10 +10 *100},(map"+".$_,0..12),map")*1e$_+(",3,6,9);s/\b$_[$i++]\w*/$_[$i+18]/gwhile$i<19;$_=reverse
eval"($_)";$_=reverse
join",",/..?.?/g
can i make it to under 200...?
213.48 Prakash Kailasa Wed Oct 9 16:25:49 2002
-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/
213.48 Michael Thelen Mon Oct 7 23:56:50 2002
-lp s/b/,/;s/.*m|,/$&,/;s/.*(?=tho|,)/$&,/;s/y(?! \w)/0/g;s/hu/H/g;s/wel/12/g;s/(?<!,)\b[a-z]{2}/.5*index zeontwthfofisiseeiniteel,$&/eg;s/\w+te/1$&/g;y/a-z //d;s/H(\d)?\b/0 .1*$1/eg;s/H//g;1while s/,(?!\d{3})/,0/
Settling in for a nice evening of golfing. Here's a one-stroke improvement to start.
213.49 Scott Hall Thu Oct 10 05:01:49 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/+10*/te|el/;$t*=/d/?100:1;/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
214.42 gimbo Thu Oct 10 03:03:13 2002
-lap map{$.=0;%t=map{(ord,$.+=20..80?10:1)}'l\xbe\0^D\xbc\x94\x83\xe1\x84\x87?WaB3J\xb9\xcd^Rw(pZA\xa04\xa9$^PPE"RL\xc7'=~/./gs;$.=$.*3+ord for/./g;$s=($n=$t{$.%248})<91?$s+$n:$s.0 x($n-89);$t+=$s,$s=0if$s>999}@F;$_=$t+$s;$\=",$&".$\while$_>999&&s/...$//
214.47 Michael Thelen Mon Oct 7 03:51:47 2002
-lp s/b/,/;s/.*m|,/$&,/;s/.*(?=tho|,)/$&,/;s/y(?! \w)/0/g;s/hu/H/g;s/wel/12/g;s~(?<!,)\b([a-z]{2})(\w+te)?~!!$2.index(zeontwthfofisiseeiniteel,$1)/2~eg;y/a-z //d;s/H(\d)?\b/0 .1*$1/eg;s/H//g;1while s/,(?!\d{3})/,0/
Got rid of sprintf (in other words, finally got around to reevaluating the first idea I got off the top of my head yesterday)
214.59 Yanick Champoux Tue Oct 8 20:21:51 2002
-pl for(reverse
split){map$y.=0
x$_,3*/b|a/+6*/io/-($i=length$y),/ed/*(2-($i%=3))+/y/*!$i;for$i(%n='z0one1wo2hr3fo4fi5x6se7g8ni9ten01le11lv21wen2ir3een1'=~/\d+|\D+/g){$y.=$n{$i}x/$i/}}$y=~s/...\B/$&,/g;$_=reverse$y
Here I am, frolicking in the evergreen fields of dubiousness.
215.38 Stephen Turner Sat Oct 5 10:59:35 2002
-pal ($x=/us/*3+/ll/+/m/)&&(@a[$x,3]=@a[3,--$x])||/hu/&&($a[3]*=100)||($a[3]+=(/on/+2*/w/+3*/h/+4*/f/+/fi/+6*/x/+7*/ev/+5*/g/+9*/ni/+4*/l/+6*/lv/+10*/te/)*10**/ty/)for@F;$_=sprintf"%03d".",%03d"x3,@a;s/^[0,]*(?=.)//
Well, it seems that @a[1,2]=@a[2,1] is better than $a[1]^=$a[2]^=$a[1]^=$a[2]. D'oh!

Remember kids, the XOR swap isn't reliable for strings with different bitlengths.

215.52 Mtv Europe Sat Oct 5 08:13:45 2002
-pal /hu/?$n*=100:/sa|mi|bi/?$n=!($s+=$n*1e3**(/o/+/i/+/b/)):do{for$i(0..9){$w=$i
if$_=~(zeontwthfofisiseeini=~/../g)[$i]}$w=7+pos
if/ten|lev|elv/g;$w+=10*/een/;$n+=$w.=0
x/ty/}for@F;$_=$s+$n;1while
s/\B\d{3}\b/,$&/
I think BoB is already in trouble
215.53 tanma Sun Oct 6 13:07:23 2002
-pl s/el/o+10/g;s/y/*10/g;s/te/+10/g;for$l(split$",")*1:3tho
 )*1:6m
 )*1:9b
 +0z +1o +2tw +3t +4fo +5f +6si +7s +8e +9n *100h"){$l=~/[a-z]+/;s/\b$&/$l/g}y/:a-z/e/d;s/.*\)/+($&/g;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
216.48 Prakash Kailasa Wed Oct 9 16:13:02 2002
-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/
217.47 Isaac Lin Sun Oct 6 17:08:26 2002
-pl @t=(o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b);map{for$i(0..14){$a=$i%10+1if/^$t[$i]/}/y/?$a*=10:/een|el/?$a+=10:0;!/d|ll/?$b+=$a:($a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0))}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
217.48 Scott Hall Thu Oct 10 04:47:31 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/;$t+=10*/te|el/;$t*=/d/?100:1;/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
218.43 gimbo Thu Oct 10 02:28:41 2002
-lap %t=map{(ord,$i+=$i<20?1:10)}'\x9e^\B\xbe~\xc6\xa1Kj\xb9\xb5^E+\x80^Q\x8co\xa7l%^Z"\xbc\x83
\x86\x974U2^BJA\x9cPH\xc1'=~/./gs;map{$c=$c*3+ord for/./g;$s=($n=$t{$c%212})<99?$s+$n:$s.0 x($n/10-10);$t+=$s,$s=0if$s>999;$c=0}@F;$_=$t+$s;$\=",$&".$\while$_>999&&s/...$//
218.48 Scott Hall Thu Oct 10 04:29:50 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/;$t+=$s{$&}*10**/y/;$t+=10*/te|el/;/d/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
218.53 Philippe Bricout Tue Oct 8 08:29:03 2002
-pl %t=qw!on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 el 11 b 9 tho 3 m 6!;s/(.*?)(b|m|tho)\w+/+($1)*10**$t{$2}/g;s/ h\w+/*100/g;s#[a-z]+#$_=$&,/../,$a=$t{$&}*(1+9*/y/)+10*/te|lv/,"+$a"#eg;$_=eval;s/.(?=(...)+$)/$&,/g
219.46 gimbo Wed Oct 9 20:12:16 2002
-lap %t=unpack"C*",q|^QL\x80M^\Y\x97^A\x9ca\x8cK^B^\x83^_\x86^K\x9eZ^EO%GoJ\xbeWBX\xc6U+N\xa1T\xb9Q\xb5P^Z=\xcc[jRlH~V\xbc)\xc1d"3
^U2]\xa7IKS|;map{$c=$c*3+ord for/./g;$s=($n=$t{$c%212}-91)<0?$s-$n:$s.0 x$n;$t+=$s,$s=0if$s>999;$c=0}@F;$_=$t+$s;$\=",$&".$\while$_>999&&s/...$//
219.53 Philippe Bricout Mon Oct 7 16:51:07 2002
-pl %t=qw!on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 el 11 b 9 tho 3 m 6!;s/(.*?)(b|m|tho)\w+/+($1)*10**$t{$2}/g;s/ h\w+/*100/g;s#[a-z]+#$_=$&,/../,$a=$t{$&}*(1+9*/ty/)+10*/te|lv/,"+$a"#eg;$_=eval;s/.(?=(...)+$)/$&,/g
Catching Michael fast...
220.47 Eike Grote Sat Oct 5 18:10:58 2002
-lp $_="\$_=($_)";s/hu\w+/*100/g;s/\w+a\w+/)*1000+(/;s/m\w+/)*1e6+(/;s/b\w+/)*1e9+(/;s/een/+10/g;s/y/*10/g;s/twelve/12/g;for$u(z,o,tw,th,fo,fi,si,se,ei,n,te,el){s/(\W)$u\w*/$1+$%/g,$%++}eval;1while s/^(\d+)(\d{3})/$1,$2/
Oops - forgot the obfuscation ;-)
220.47 Scott Hall Thu Oct 10 03:23:48 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 1 m 6 b 9);map{/$s/&($t+=$s{$&}*10**/y/);$t+=10*/te|el/;/d/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
220.47 Michael Thelen Mon Oct 7 03:41:41 2002
-lp s/b/,/;s/.*m|,/$&,/;s/.*(?=tho|,)/$&,/;s/y(?! \w)/0/g;s/hu/H/g;s/wel/12/g;s~(?<!,)\b([a-z]{2})(\w+te)?~!!$2.index(zeontwthfofisiseeiniteel,$1)/2~eg;y/a-z //d;s/H(\d)?\b/0 .1*$1/eg;s/H//g;s/,(\d*)/sprintf",%03d",$1/eg
Incorporating a few ideas I had in my sleep last night. Toooo many substitutions... must get rid of some...
220.48 Isaac Lin Sun Oct 6 05:14:26 2002
-pl @t=(z,o,tw,th,fo,fi,si,se,ei,n,te,el,h,p,mi,b);map{for$i(0..15){$a=$i%10if/^$t[$i]/}$a*=10if/y/;$a+=10if/te?en|el/;!/d|on$/?$b+=$a:($a<3?$b*=100:($c+=$b*10**($a*3-6),$b=0))}split;$_=$c+$b;1while s/(\d+)(\d{3})/$1,$2/
220.58 Yanick Champoux Tue Oct 8 12:09:42 2002
-pl for(reverse split){map$y.=0
x$_,3*/b|a/+6*/io/-($i=length$y),/ed/*(2-$i%3),/y/*!($i%3);for$i(%n='z0one1wo2hr3fo4fi5x6se7g8ni9ten01le11lv21wen2ir3'=~/\d+|\D+/g){$y.=$n{$i}x/$i/}$y.=/een/}$y=~s/...\B/$&,/g;$_=reverse$y
Regexes, regexes everywhere An evil course begetting a tainted script Regexes, regexes everywhere Yet there still strokes to skip

There was a young man called Yanick, Who played golf while in a blind panic. He used 'reverse' twice, What in the name of Holy Living $*&@!! was he thinking?!!

221.48 Scott Hall Thu Oct 10 03:13:20 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*10**/y/);$t+=10*/te|el/;/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s!.*\d(?=\d{3})!$&,!
222.47 Michael Wrenn Mon Oct 7 22:09:41 2002
-l $_=<>;y/y/0/;s/tw/x/g;s/fo/d/g;s/sev/q/g;s/el/o/g;s/[etv]en|ove/+10/g;$p++;for$d(qw(tho m b)){$p*=1e3;s/$d\w+/)*$p+(/g}s/\b([a-z])[a-z]*/+$1/g;y/zoxtdfsqen/0-9/;s/\+h/*100/g;$_=eval"($_)";s/.(?=(...){1,3}\b)/$&,/g;print
It is hard to shave! I hope I don't cut myself!
222.53 Ross Younger Thu Oct 10 18:58:37 2002
-lap sub F{my$x;++$x,$_[0]=~/$_/&&last for
qw{on wo th fo f x s g i te ev t}}$t+=$b=$c*(/b/?1e9:/m/?1e6:/a/?1e3:0),$c=$b?0:/d/?$c*100:/y/?$c+10*F($_)%100:/een/?$c+10+F$_:$c+F$_
for@F;$_=$t+$c;0while s/(?<=\d)...(?!\d)/,$&/
223.44 Philippe Bricout Mon Oct 7 14:56:08 2002
-pl %t=(on,1,tw,2,th,3,fo,4,fi,5,si,6,se,7,ei,8,ni,9,el,11,b,9,tho,3,mi,6);sub _{$_=pop;/../;$t{$&}*(1+9*/ty/)+10*/te|lv/}s/(.*?)(b|mi|tho)\w+/+($1)*10**$t{$2}/g;s/ h\w+/*100/g;s/[a-z]+/+_($&)/g;$_=eval;s/.(?=(...)+$)/$&,/g
Last post as beginner, last time in top-ten... ;-)

you haven't been a beginner for a while, Philippe :)

223.50 Michiel van Leeuwen Sat Oct 5 22:08:21 2002
-apl map{s/ho|mi|bi/${$&}=$r;$r=0/e;$t=s/.*lv/12/;for$q qw(z o tw th fo fi si se ei n te el){s/^$q/$t/;$t++};$r+=($_+(/tee/?10:0))*(/y/?10:1);$r*=/hu/?100:1;}@F;$_=$bi*1e9+$mi*1e6+$ho*1e3+$r;while(s/(?<=\d).{3}($|,)/,$&/){}
223.60 tinita Tue Oct 8 22:19:48 2002
-lp @_=(qw{y een z o two|twen th[^o] fo f si s ei n te e tw h t m b *10
+10},(map"+".$_,0..12),"*100",map")*1e$_+(",3,6,9);s/$\xa7$_[$i]\w*/$_[$i+19]/g,$i++and$\xa7='\b'while$i<19;$_=reverse
eval"($_)";$_=reverse
join",",/..?.?/g
224.47 Scott Hall Thu Oct 10 02:35:40 2002
-alp $s=join"|",%s=se7x6g8w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*(/y/?10:1));$t+=10*/el|te/;/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;1while s/.*\d(?=\d{3})/$&,/
224.51 Prakash Kailasa Wed Oct 9 14:58:35 2002
-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/
224.56 Amir Karger Tue Oct 8 02:28:26 2002
-lp $r=$_;
$r=~s/$_[a-z]*/$a<2?0+$a."ty $1":$a-2/ge,$a++
for" h",qw((\w+)te ty one two|twen th[ir] fo f si se ei ni te ele tw);
$_=join",",map{ 
sprintf"%03d",$r=~s/.*$_//i&&eval join"+",$&=~/\d+/g
}b,M,t,"";
s/^[0,]*(.)/$1/
Oh no! Yanick's coming!
225.38 gimbo Wed Oct 9 13:50:25 2002
-lap %t=unpack"C*",q=^Q^O\x80^NB^C\xc6^F+
\xa1^G^\^B\x97Z\xb5^K\xb9
\x9ca\x8c^P^Z^^j^I^B^\x83<l^S\xbc2~^E\xc1d"(\x86P2[
F\x9e^A^E^L\xa7^RK^H%^To^Q\xbe^D=;map{$c=$c*3+ord for/./g;($n=$t{$c%212})<91?($s+=$n):($n-=91)?($t+=$s.0 x$n,$s=0):($s*=100);$c=0}@F;$_=$t+$s;$\=",$&".$\while$_>999&&s/...$//
225.45 Michael Rybakin Sat Oct 5 11:33:07 2002
-lp map{/../;($D='ontwthfofisiseeiniteel')=~/$&/g;$n=pos($D)/2;/.../;if(($M='thomilbil')=~/$&/g){$R+=$r*10**pos($M),$r=0}else{/hu/?$r*=100:$r+=/ty/?$n*10:/(een|lv)/?$n+10:$n}}/\S+/g;$_=$r+$R;1while+s/(\d)(\d{3})($|,)/$1,$2$3/
sorry to keep you hanging around
225.48 Michael Wrenn Mon Oct 7 20:10:26 2002
-l $_=<>;y/y/0/;s/tw/x/g;s/fo/d/g;s/sev/q/g;s/el/o/g;s/[etv]en|ove/+10/g;$p++;for$d(qw(tho m b)){$p*=1e3;s/$d\w+/)*$p+(/g}s/\b([a-z])[a-z]*/+$1/g;y/zoxtdfsqen/0-9/;s/\+h/*100/g;$_=eval"($_)";1while s/\d(?=...($|,))/$&,/;print
A new method, but only one stroke shaved. Time for something completely different?
225.56 Amir Karger Tue Oct 8 01:12:01 2002
-lp $r=$_;
$r=~s/$_[a-z]*/$a<2?0+$a."ty $1":$a-2/ge,$a++
for" h",qw((\\w+)te ty one two|twen th[ir] fo f si se ei ni te ele tw);
$_=join",",map{ 
sprintf"%03d",$r=~s/.*$_//i&&eval join"+",$&=~/\d+/g
}b,M,t,"";
s/^[0,]*(.)/$1/
The sand trap?! I'm offended! Anyway, this new score is a better first score than my usual. (Sorry I don't have time for the use strict -w version this time!) Too bad I'm not sure how much better it's going to get!
225.59 Yanick Champoux Tue Oct 8 01:33:01 2002
-pl for(reverse
split){$i=length$y;map$y.=0
x$_,3*/b|a/+6*/io/-$i,/ed/*(2-$i%3),/y/*!($i%3);for$i(%n='z0one1wo2hr3fo4fi5x6se7g8ni9ten01le11lv21wen2ir3'=~/\d+|\D+/g){$y.=$n{$i}if/$i/}$y.=1if/een/}$y=~s/...\B/$&,/g;$_=reverse$y
Many thanks to /-\ndrew for his mrmagoo.pl
225.60 tinita Tue Oct 8 21:41:22 2002
-lp @_=(qw{y een z o two|twen th[^o] fo f si s ei n te e tw h t m b $ *10
+10},(map"+".$_,0..12),"*100",map")*1e$_+(",3,6,9);s/$\xa7$_[$i]\w*/$_[$i+20]/g,$i++and$\xa7='\b'while$i<19;$_=reverse
eval"($_)";$_=reverse
join",",/..?.?/g
it's a shame... i'm not getting anywhere with this...

keep trying!

226.37 Stephen Turner Sat Oct 5 10:19:33 2002
-pal ($x=/us/*3+/ll/+/m/)&&($a[--$x]^=$a[3]^=$a[$x]^=$a[3])||/hu/&&($a[3]*=100)||($a[3]+=(/on/+2*/w/+3*/h/+4*/f/+/fi/+6*/x/+7*/ev/+5*/g/+9*/ni/+4*/l/+6*/lv/+10*/te/)*10**/ty/)for@F;$_=sprintf"%03d".",%03d"x3,@a;s/^[0,]*(?=.)//
A working solution to get me on the board.
226.51 Michael Wrenn Mon Oct 7 12:19:01 2002
-l $_=<>;s/y/0/g;s/een|lve/+10/g;$k=$p++;for$d(qw(tho m b)){$p*=1e3;s/$d\w+/)*$p+(/g}for$d(qw(z o tw th fo f si s ei n te e)){s/\b(1?)$d\w*?(0?)\b/+$1$k$2/g&$k++}s/\bh\w+/*100/g;$_=eval"($_)";1while s/\d(?=...(,|$))/$&,/;print
I'm keeping up at twice BoB! Congrats on BoB's play in this one!

Bob originally thought 200 was going to be difficult!

229.51 Prakash Kailasa Mon Oct 7 21:46:35 2002
-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/
229.55 Ross Younger Wed Oct 9 23:46:28 2002
-lp sub F{my$x;$x++,$_[0]=~/$_/&&return$x
for qw{on wo th fo f x s g i te ev t}}$t+=$b=$c*(/b/?1e9:/m/?1e6:/a/?1e3:0),$c=$b?0:/d/?$c*100:/y/?$c+10*F($_)%100:/een/?$c+10+F$_:$c+F$_
for split;$_=$t+$c;0while s/(?<=\d)...(?!\d)/,$&/
230.37 gimbo Tue Oct 8 01:57:44 2002
-lap %t=unpack"C*",q=^Q^O\x80^NB^C\xc6^F+
\xa1^G^\^B\x97Z\xb5^K\xb9
\x9ca\x8c^P^Z^^j^I^B^\x83<l^S\xbc2~^E\xc1d"(\x86P2[
F\x9e^A^E^L\xa7^RK^H%^To^Q\xbe^D=;map{$c=$c*3+ord for/./g;($n=$t{$c%212})<91?($s+=$n):($n-=91)?($t+=$s.0 x$n,$s=0):($s*=100);$c=0}@F;$_=1e12+$t+$s;s/^1|.../,$&/g;s/^,1[0,]+(?=.)//
230.53 Mtv Europe Sat Oct 5 07:59:25 2002
-pal /hu/?$n*=100:/sa|mi|bi/?do{$s+=$n*10**(3*/sa/+6*/mi/+9*/bi/),$n=0}:do{for$i(0..9){$w=$i if$_=~(zeontwthfofisiseeini=~/../g)[$i]}$w=7+pos if/ten|lev|elv/g;$w+=10*/een/;$w.=0if/ty/;$n+=$w}for@F;$_=$s+$n;1while s/\B\d\d\d\b/,$&/
231.50 Prakash Kailasa Mon Oct 7 20:24:57 2002
-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/
simple rearrangement
231.51 Matt Johnson Wed Oct 9 13:15:06 2002
-alp @~=qw~h tho m b twel z o tw th fo f si s ei n t e~;@:{@~}=(qw~*100+ )*1e3+( )*1e6+( )*1e9+(~,12,0..11);for(@F){s/y/*10+/;s/een/+10/}for$~(@~){map{s/^$~\w+/$:{$~}/}@F}$_="(@F)";s/\+ *\)/)/g;$_=eval;1while s/(\d+)(\d{3})/$1,$2/;
The heads of the numbers don't need to be mutually exclusive. It's a list so we can guarantee ordering!
232.47 Scott Hall Thu Oct 10 02:11:42 2002
-alp $s=join"|",%s=se7si6g8z0w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(.)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*(/y/?10:1));$t+=10*/el|te/;/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/
234.40 gimbo Mon Oct 7 19:21:48 2002
-lap %t=unpack"C*",q=g^Oo^Nb^C^I^F'
#^G`^B^ZZ^G^Kc
Ga^E^P^D^^^H^I^S^p<+^S^B2^\^E^]d6(^NPK[jF^L^A$^LI^R-^H:^TO^Q;^D=;map{$c=$c*26-97+ord for/./g;($n=$t{$c%118})<91?($s+=$n):($n-=91)?($t+=$s.0 x$n,$s=0):($s*=100);$c=0}@F;$_=1e12+$t+$s;s/^1|.../,$&/g;s/^,1[0,]+(?=.)//
234.46 TheodoreYoung Tue Oct 8 13:11:48 2002
-lp $"='|';@_{@_=qw/twel z o tw th fo f si s ei n t e/}=(12,0..11);($tho,$m,$b)=(3,6,9);($een,$y)=qw/+ */;s/\b(tho|m|b)\w+/)*10**$$1+(/g;s/(een|y)\b/$$1 10/g;s/\b(@_)\w*/+$_{$1}/g;s/\bh\w+/*100/g;$_= eval"($_)";s/(.)(?=(...)+$)/$1,/g;
I really hoped you would notice that! Now, what about the other 100 characters :)
234.47 Scott Hall Thu Oct 10 02:08:32 2002
-alp $s=join"|",%s=se7si6g8z0w2hr3hi3fo4f5ni9ne1le1=~/(\D+)(\d+)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*(/y/?10:1));$t+=10*/el|te/;/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/
234.52 Eric Roode Wed Oct 9 20:45:13 2002
-apl %v=split/(\d)/,on1tw2th3fo4fi5si6se7ei8ni9el1tho1mil2bil3;*q=\$a[0];for(@F){/((..).)/;if($m=$v{$1}){$a[$m]=$q;$q=0;$b||=$m}else{$a=$v{$2}+10*/te|l.?v/;$q+=$a+$a*9*/ty/;$q*=100if/dr/}}$_=$a[$b];$_.=sprintf',%03d',$a[$b]while$b-->0
235.51 Eric Roode Thu Oct 10 19:00:38 2002
-apl %v=split/(\d)/,on1tw2th3fo4fi5si6se7ei8ni9el1tho1mil2bil3;*q=\$a[0];for(@F){/((..).)/;if($m=$v{$1}){$a[$m]=$q;$q=0;$b||=$m}else{$a=$v{$2}+10*/te|l.?v/;$q+=$a+$a*9*/ty/;$q+=99*$q*/dr/}}$_=$a[$b];$_.=sprintf',%03d',$a[$b]while$b-->0
Bah, I'm just tweaking this. I need to come up with a better algorithm.
236.40 gimbo Mon Oct 7 19:14:06 2002
-lap %t=unpack"C*",q=g^Oo^N`^B^ZZGa^E^P^S^p<^NP^L^A$^L:^TO^Q;^Db^C^I^F'
#^Gc
^G^K^D^^<\0^H^I+^S^\^E^B2^]d6(jFK[I^R-^H=;map{$c=$c*26-97+ord for/./g;($n=$t{$c%118})<91?($s+=$n):($n-=91)?($t+=$s.0 x$n,$s=0):($s*=100);$c=0}@F;$_=1e12+$t+$s;s/^1|.../,$&/g;s/^,1[0,]+(?=.)//
236.56 Philippe Bricout Mon Oct 7 12:23:19 2002
-pl %t=qw#ze 0 on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 0 el 11 b 9 m 6 tho 3#;sub _{$_=pop;/../;$t{$&}*(1+9*/ty/)+10*/te|lv/}s/([^(]*?)(b|m|tho)\w+/+($1)*10**$t{$2}/g;s/ h\w+/*100/g;s/[a-z]+/+_($&)/g;$_=eval;s/.(?=(...)+$)/$&,/g
237.46 Prakash Kailasa Tue Oct 8 21:22:09 2002
-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/
237.48 Marius Ascheberg Thu Oct 10 23:04:51 2002
-lpa $f=1;@h{z,o,'tw(o|en)','th[^o]',fo,fi,si,se,ei,n,te,el,twel,h,tho,mi,b}=(0..12,1e2,1e3,1e6,1e9);map{/^$r/and$t>12?($f=$t>$f?$t:$f*$t):($g+=$f*(/een/?10+$t:$t)*(/y/?10:1))while($r,$t)=each%h}reverse@F;$_=$g;s/[\d,](?=(\d{3})+$)/$&,/g
239.45 Danny Rathjens Sun Oct 6 20:31:13 2002
-lap $d{$_}=++$i for qw(on tw th fo fi si se ei ni te);@d{mi,bi}=(6,9);for(@F){/^../;$;=$d{$&};$@+=10*$;if/y/;$@+=10+($;||1)if/e(l|en)/;$@*=100 if/hu/;$@+=$;if!/(.{6}|y)/;$n+=$@*10**$;,$@=0 if/[hi]o/}$_=$n+$@;1 while s/^(\d+)(\d{3})/$1,$2/
239.47 Scott Hall Mon Oct 7 11:27:04 2002
-alp $s=join"|",%s=el11z0ne1w2hr3hi3fo4f5si6se7ei8ni9=~/(\D+)(\d+)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*(/y/?10:1));/lv|te/&&($t+=10);/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/
239.54 Michael Wrenn Mon Oct 7 03:16:26 2002
-l $_=<>;@e=(1e3,1e6,1e9,2,0..12);s/y/0/g;s/een/+10/g;for$d(qw(tho m b twen z o two th fo f si s ei n te e t)){s/\b(1?)$d\w*?(0?)\b/+$1$e[$k]$2/g&$k++}s/\+(100+)/)*$1+(/g;s/\bh\w+/*100/g;$_=eval"($_)";1while s/(\d)(...)(,|$)/$1,$2$3/;print
This is a really fun problem! My goal is to stay under twice the leader. I am safe for now!
240.45 Prakash Kailasa Tue Oct 8 21:01:32 2002
-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/
New method, but, is worse than my other. Let's see if I can improve on this.
241.40 gimbo Sun Oct 6 15:02:26 2002
-lap %t=unpack"C*",q=g/o.`"^ZzG}^E0^S|p\^Np^L!$,:4O1;$b#^I&'-#'c*^G+^D>< ^H)+3^\%^BR^]~6HjfK{I2-(=;map{$c=$c*26-97+ord for/./g;($n=$t{$c%118}-32)<91?($s+=$n):($n-=91)?($t+=$s*1e3**$n,$s=0):($s*=100);$c=0}@F;$_=1e12+$t+$s;s/^1|.../,$&/g;s/^,1[0,]+(?=.)//
241.48 Prakash Kailasa Mon Oct 7 20:16:25 2002
-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/
minor improvements.
241.51 Eike Grote Sat Oct 5 18:09:32 2002
-lp 
$_="\$_=($_)";
s/hu\w+/*100/g;
s/\w+a\w+/)*1000+(/g;
s/m\w+/)*1e6+(/g;
s/b\w+/)*1e9+(/g;
s/een/+10/g;
s/y/*10/g;
s/twelve/12/g;
for $u (z,o,tw,th,fo,fi,si,se,ei,n,te,el){
  s/(\W)$u\w*/$1+$%/g,$%++;
}
eval;
1while s/^(\d+)(\d{3})/$1,$2/;
A completely new idea
241.52 Eric Roode Wed Oct 9 17:56:36 2002
-apl %v=split/(\d)/,on1tw2th3fo4fi5si6se7ei8ni9el1tho1mil2bil3;*q=\$a[0];for(@F){/((..).)/;if($m=$v{$1}){$a[$m]=$q;$q=0;$b||=$m}else{$a=$v{$2};$a+=10*/te|l.?v/;$a*=10if/ty/;$q+=$a;$q*=100if/dr/}}$_=$a[$b];$_.=sprintf',%03d',$a[$b]while$b-->0
242.48 Marius Ascheberg Tue Oct 8 11:19:19 2002
-lpa $f=1;@h{z,o,'tw(o|en)','th[^o]',fo,fi,si,se,ei,n,te,el,twel,h,tho,mi,b}=(0..12,1e2,1e3,1e6,1e9);map{/^$r/&&($t>12?($f=$t>$f?$t:$f*$t):($g+=$f*(/een/?10+$t:$t)*(/y/?10:1)))while($r,$t)=each%h}reverse@F;$_=$g;1while s/(\d)(...)(,|$)/$1,$2/
243.62 Yanick Champoux Tue Oct 8 01:23:31 2002
-pl for(reverse
split){$i=length$y;map$y.=0
x$_,3*/b|and/+6*/ion/-$i,/dred/*(2-$i%3),/ty/*!($i%3);for$i(%n='z0one1wo2thre3fo4fi5ix6sev7eig8ni9ten01ele11lve21twen2thir3'=~/\d+|\D+/g){$y.=$n{$i}if/$i/}$y.=1if/teen/}$y=~s/...\B/$&,/g;$_=reverse$y
I can't say how surprised I am that it actually pass the tests...
244.40 Josef Drexler Sun Oct 6 07:00:34 2002
-lpa $d{$_}=$a++for@v=(ze,on,tw,th,fo,fi,si,se,ei,ni,te,el);$d{$_}=++$b*3for@p=(tho,mi,b);local$"="|",$_=/@p/?"))*1E$d{$&}+((":(/../,$,=$d{$&},/y/?"+$,0":/tee|lve/?"+1$,":/hu/?")*100+(":"+$,")for@F;$_=eval"((@F+0))";1while s/(\d+)(\d{3})/$1,$2/
244.47 TheodoreYoung Tue Oct 8 13:06:20 2002
-lp $"='|';@n{@n=qw/twel z o tw th fo f si s ei n t e/}=(12,0..11);($tho,$m,$b)=(3,6,9);($een,$y)=qw/+ */;s/\b(tho|m|b)\w+/)*10**$$1+(/g;s/(een|y)\b/$$1 10/g;s/\b(@n)\w*/+$n{$1}/g;s/\bh\w+/*100/g;$_= eval"($_)";s/(.)(?=(...)+$)/$1,/g;END{exit};
244.48 Scott Hall Mon Oct 7 01:53:14 2002
-alp $s=join"|",%s=te10el11z0ne1w2hr3hi3fo4f5si6se7ei8ni9=~/(\D+)(\d+)/g;%m=qw(ho 3 m 6 b 9);map{/$s/&($t+=$s{$&}*(/y/?10:1));/lv|een/&&($t+=10);/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}@F;$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/
244.49 Michiel van Leeuwen Sat Oct 5 19:26:02 2002
-apl map{$t=1;for$q qw(ho mi bi){s/$q/$s+=$r*10**($t*3);$r=0/e;$t++}$f=/y/?10:1;$p=/tee/?10:0;$t=s/.*lv/12/;for$q qw(z o tw th fo fi si se ei n te el){s/^$q.*/$t/;$t++};$r+=($_+$p)*$f;$r*=/hu/?100:1;}@F;$_=$r+$s;while(s/(?<=\d).{3}($|,)/,$&/){}
useless use of assignment.....
244.57 Philippe Bricout Mon Oct 7 12:11:11 2002
-pl %t=qw#ze 0 on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 0 el 11 b 9 m 6 tho 3#;
sub _{$_=pop;/../;$t{$&}*(1+9*/ty/)+10*/te|lv/}s/([^(]*?)(b|m|tho)\w+/+($1)*10**$t{$2}/g;s/ h\w+/*100/g;s/([a-z]+)/+_($1)/g;$_=eval;s/(\d)(?=(\d{3})+$)/$1,/g
245.48 Scott Hall Sun Oct 6 22:53:16 2002
-alp $s=join"|",%s=te10el11z0ne1w2hr3hi3fo4f5si6se7ei8ni9=~/(\D+)(\d+)/g;%m=qw(ho 3 m 6 b 9);for(@F){/$s/&($t+=$s{$&}*(/y/?10:1));/lv|een/&&($t+=10);/hu/&&($t*=100);/ho|m|b/&&($t*=10**$m{$&},$u+=$t,$t=0)}$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/
246.40 Joe Baldassini Fri Oct 11 21:55:56 2002
-apl for(@F){$e=/^b/?9:/^m/?6:/sa/?3:0;$a+=$e?$c*10**$e:0;$c*=/^h/?100:$e?0:1;$d=/le/?11:/^te/?10:/^n/?9:/^e/?8:/^se/?7:/x/?6:/^fi/?5:/^fo/?4:/hr|hi/?3:/w/?2:/^o/?1:0;$d*=/y$/?10:1;$d+=/lv|een/?10:0;$c+=$d}$_=$a+$c;1while s/^(-?\d+)(\d{3})/$1,$2/
246.51 Matt Johnson Mon Oct 7 20:14:54 2002
-alp @~=qw'z o tw th fo fi si se ei n te el tl h x m b';@:{@~}=(0..12,qw'*100+ )*1e3+( )*1e6+( )*1e9+(');for(@F){s/y/*10+/;s/een/+10/;s/wel/l/;s/tho/x/}for$~(@~){map{s/^$~\w+/$:{$~}/}@F}$_="(@F)";s/\+ *\)/)/g;$_=eval;1while s/(\d+)(\d{3})/$1,$2/;
Heh, use stringification to ditch the join().
252.39 gimbo Sun Oct 6 01:56:35 2002
-lp %t=q|g/o.`"^ZzG\x86^E0^S\x85p\^Np^L!$,:4O1;$b#^I&'-#'c*^G+^D>< ^H)+3^\%^BR^]\x876HjfK\x84I2-(|=~/./g;map{if(/ /){($n=-32+ord$t{chr$c})<99?($s+=$n):($n-=100)?($t+=$s*1e3**$n,$s=0):($s*=100);$c=0}else{$c=($c*26-97+ord)%118}}/./g,$";$_=$s+$t;s/.(?=.)/(length$')%3?$&:"$&,"/eg
252.46 Danny Rathjens Sun Oct 6 19:45:33 2002
-lap @d{on,el}=(1,1);$d{$_}=2+$i++for qw(tw th fo fi si se ei ni te);for(@F){/^../;$d=$d{$&};$@+=$d*10 if/y/;$@+=$d+10 if/e(l|en)/;$@*=100 if/hu/;$@+=$d if!/(.{6}|y)/;$m=/d/?3:/m/?6:9,$n+=$@*10**$m,$@=0 if/[hi]o/}$_=$n+$@;1 while s/^(\d+)(\d{3})/$1,$2/
totaling up and commifying afterwards seems a bit more efficient than my s/// of an output template
252.48 Michiel van Leeuwen Sat Oct 5 15:41:57 2002
-apl @a=qw(z o tw th fo fi si se ei n te el);map{$t=1;for$q(qw(ho mi bi)){s/$q/$s+=$r*10**($t*3);$r=0/e;$t++}$f=/y/?10:1;$p=/tee/?10:0;$t=s/.*lv/12/;for$q(@a){s/^$q.*/$t/;$t++};$r+=($_+$p)*$f;$r*=/hu/?100:1;}@F;$_=$r+$s;while(s/(?<=\d).{3}($|,)/,$&/){}
253.60 Chris Dolan Sat Oct 5 08:13:29 2002
-lp y/euhi//d;s/ty/0/g;s/(\w+)tn/1$1/g;split/ /," zro on tw.n? tr for ff|fv sx svn gt? nn tn lvn twlv";s/$x/$#_/gwhile$x=pop@_;split/ /,"   n t   m   b";($x=pop@_)&&s/([^^I]*) $x/($1)*1e$#_^I/gwhile@_;s/\s+([^)])/+$1/g;$_=eval;1while s/(\d)(..\d)\b/$1,$2/
Last simple reductions. Leaving for vacation in a few hours, and will be offline.

Can I go back to bed, then?

254.47 Prakash Kailasa Mon Oct 7 16:51:00 2002
-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/
ugly. but it's a start.

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

255.47 Marius Ascheberg Mon Oct 7 19:40:52 2002
-lpa $f=1;map$h{$_}=(0..12,1e2,1e3,1e6,1e9)[$?++],z,o,'tw(o|en)','th[^o]',fo,fi,si,se,ei,n,te,el,twel,h,tho,mi,b;map{/^$r/&&($t>12?($f=$t>$f?$t:$f*$t):($g+=$f*($t+(/een/?10:0))*(/y/?10:1)))while($r,$t)=each%h}reverse@F;$_=$g;1while s/(\d)(...)(,|$)/$1,$2/
0.06 in front of Matt, perfect. :>
255.53 Matt Johnson Mon Oct 7 19:23:43 2002
-alp @n=qw'z o tw th fo fi si se ei n te el tl h x m b';@a{@n}=(0..12,qw'*100+ )*1e3+( )*1e6+( )*1e9+(');for(@F){s/y/*10+/;s/een/+10/;s/wel/l/;s/tho/x/}for$q(@n){map{s/^$q\w+/$a{$q}/}@F}$_=join'','(',@F,')';s/\+\)/)/g;$_=eval;1while s/(\d+)(\d{3})/$1,$2/;
$score -= 20; # hm, should've paid more attention when I was working out the string building!
257.48 Michael Thelen Sun Oct 6 09:47:57 2002
-lp sub f{.5*index'zeontwthfofisiseeiniteel',pop}s/wel/12/g;s/b/,/;s/m/,/||s/,/,,/;s/tho/,/||s/(.*),/$1,,/;s/ty( ,|$)/0$1/g;s/ h/H/g;s/(\S\S)\S+een/10+f$1/eg;s/(?<![,-z])[a-z]{2}/f$&/eg;y/a-z //d;s/H(\d)?\b/'0'.1*$1/eg;s/H//g;s/(?<=,)\d*/sprintf"%03d",$&/eg
Just a quick fix, now I really am going to sleep (well, going to bed anyway).
258.39 Phil Radden Wed Oct 9 19:18:36 2002
-lp $~=$,="";1while s# ?\b(\S.)\S*$#($_=$&)=~/ed/&&($,=substr("00$~",-2).$,,$~="");/ho|il/&&($}=",000"x(/s/?1:/m/?2:3),$,=$}|substr((" "x20).$~.$,,-length$}),$~="");$}=index('zeontwthfofisiseeiniteel',$1)/2,$~+=/lv/?12:/y$/?$}*10:/ee./?$}+10:$},""#e;$_=$~.$,
Eurgh, why do I do this... Thought the algorithm was good, but evidently not. Can't see anything else to do except try a self-extracting compressed thing, which I can't be bothered with...
258.47 Michiel van Leeuwen Sat Oct 5 14:17:57 2002
-apl @a=qw(z o tw th fo fi si se ei n te el);@b=qw(ho mi bi);map{$t=1;for$q(@b){s/$q/$s+=$r*10**($t*3);$r=0/e;$t++}$f=/y/?10:1;$p=/tee/?10:0;$t=s/.*lv/12/;for$q(@a){s/^$q.*/$t/;$t++};$r+=($_+$p)*$f;$r*=/hu/?100:1;}@F;$_=$r+$s;while(s/(?<=\d).{3}($|,)/,$&/){}
258.60 Chris Dolan Sat Oct 5 08:01:40 2002
-lp s/(\w+)teen/1$1/g;s/ty/0/g;y/eu//d;split/ /," zro on tw.n? thi?r for fi. six svn ight? nin tn lvn twlv";s/$x/$#_/gwhile$x=pop@_;split/ /,"   h t   m   b";($x=pop@_)&&s/([^^I]*) $x/($1)*1e$#_^I/gwhile@_;s/\s+([^)])/+$1/g;$_=eval;1while s/(\d)(..\d)\b/$1,$2/
Use "\w+" == 0 to my advantage
259.53 Ross Younger Tue Oct 8 22:31:01 2002
-lp sub F{my$x;$x++,$_[0]=~/$_/&&return$x
for qw{on wo th fo f x s g i te ev t}}/b/?($t=1e9*$c,$c=0):/m/?($t+=1e6*$c,$c=0):/a/?($t+=1e3*$c,$c=0):/d/?$c*=100:/y/?$c+=10*F($_)%100:/een/?$c+=10+F$_:($c+=F$_)for
split;$_=reverse$t+$c;s/...(?=.)/$&,/g,$_=reverse$_
266.62 Chris Dolan Sat Oct 5 07:58:44 2002
-lp s/(\w+)teen/1$1/g;s/ty/0/g;y/edu//d;split/ /," zro on tw.n? thi?r for fi. six svn ight? nin tn lvn twlv";s/$x/$#_/gwhile$x=pop@_;split/ /,"   hnr thosan   m   b";($x=pop@_)&&s/([^^I]*) $x/($1)*1e$#_^I/gwhile@_;s/\s+([^)])/+$1/g;$_=eval;1while s/(\d)(..\d)\b/$1,$2/
Some good unambiguous character deletions
267.48 Marius Ascheberg Mon Oct 7 13:37:31 2002
-lna $f=1;map{$h{$_}=(0..12,1e2,1e3,1e6,1e9)[$?++]}z,o,'tw(o|en)','th[^o]',fo,fi,si,se,ei,n,te,el,twel,h,tho,mi,b;map{for$r(keys%h){$t=$h{$r};$t>=100?($f=$t>$f?$t:$f*$t):($g+=$f*($t+(/een/?10:0))*(/y/?10:1))if/^$r/}}reverse@F;1while$g=~s/(\d)(...)(,|$)/$1,$2/;print$g
this is the sort of jump I like to see
267.57 Eric Roode Wed Oct 9 14:46:05 2002
-apl %m=qw/tho 1 mil 2 bil 3/;%v=qw/on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 el 1/;*q=\$a[0];for(@F){/((..).)/;if($m=$m{$1}){$a[$m]=$q;$q=0;$b||=$m}else{$a=$v{$2};$a+=10*/te|l.?v/;/ty/and$a*=10;$q+=$a;/dr/and$q*=100}}$_=$a[$b];$_.=sprintf',%03d',$a[$b]while$b-->0
No maps or greps. What's wrong with me?
268.54 Ross Younger Tue Oct 8 21:21:58 2002
-lp sub F{my$x;($x++,!index$_[0],$_)&&return$x
for qw{o two th fo f si s ei n te e t}}/b/?($t=1e9*$c,$c=0):/m/?($t+=1e6*$c,$c=0):/ho/?($t+=1e3*$c,$c=0):/^h/?$c*=100:/ty/?$c+=10*F($_)%100:/een/?$c+=10+F$_:($c+=F$_)for
split;$_=reverse$t+$c;s/...(?=.)/$&,/g,$_=reverse$_
272.56 Sheldon Fuchs Tue Oct 8 06:59:09 2002
@s=qw~z/0 wel/12 el/11 te/+10 th[^o]/3 m/|10**6| th/|1000| b/|10**9| hu/*100+ one/1 tw/2 fo/4 fi/5 si/6 se/7 ei/8 ni/9 ty/0+ [a-z]/~;map{for$a(@s){eval"s/$a/g"}@a=map{s/\+ ?$//;eval}split/\|/;$_='';$_+=shift(@a)*(shift@a||1)while@a;s/(\d)(?=(\d{3})+$)/$1,/g;print"$_\n"}<>
276.51 Matt Johnson Sun Oct 6 16:36:33 2002
-alp @n=qw'z o tw th fo fi si se ei n te el tl h x m b';@a{@n}=(0..12,qw'*100+ )*1e3+( )*1e6+( )*1e9+(');for(@F){s/y/*10+/;s/een/+10/;s/wel/l/;s/tho/x/}for$q(@n){map{s/^$q\w+/$a{$q}/}@F}$_=join'',@F,')';s/\+\)/\)/g;$_=eval('('x(tr/)//-tr/(//).$_);1while s/(\d+)(\d{3})/$1,$2/;
Last one for a while, I think... running to the end of this road.
277.54 Eike Grote Sat Oct 5 16:52:21 2002
-nla for(@F){$x+=$g*1e3,$g=0,next if/a/;$x+=$g*1e6,$g=0,next if/m/;$x+=$g*1e9,$g=0,next if/b/;$g*=100,next if/^h/;for$u(z,o,tw,th,fo,fi,si,se,ei,n,te,el){last if/^$u/;$z++;$z=12if/lv/} $g+=10if/een$/;$g+=$z*10,$z=0if/y$/;$g+=$z;$z=0}$_=$x+$g;1while s/^(\d+)(\d{3})/$1,$2/;print
Getting rid of those number names saves some amount of bytes...

much improved!

278.46 entropie Wed Oct 9 19:57:09 2002
-l $s=<>;for$a(" b"," m"," tho",''){$k=($s=~s/(.*)$a\w*//?$1:'');$i=12;for$,qw(twel el te n e se si fi fo th tw o z){$k=~s/\b$,[^t ]*(ty|teen)?/$i$1/g;$i--}$_=$k;$o.=','.(s/(.) h\w+//?$1:'0');s/(.)teen/1$1/;s/(.)ty( .)?/$1*10+$2/e;$o.=sprintf"%02d",$_}$o=~s/^[0,]*//;print $o||0
285.47 Danny Sadinoff Thu Oct 10 04:06:51 2002
-lap for(@F){/(ho)|(mi)|(bi)/&&do{$$_ and$n*=1e3**$_ for 1..3;$a+=$n;$n=0;next};s/hu/$n*=100;next/e;$o=0;/te[ne]/and$o=10;/(on)|(wo)|(th)|(fo)|(fi)|(si)|(se)|(ei)|(ni)|()(le)|(lv)/&&do{$$_ and$o+=$_ for 1..12};/ty/&&do{$o=2if/tw/;$o*=10};$n+=$o}$_=$n+$a;1while s/^(-?\d+)(\d{3})/$1,$2/
factored out tens place, combined lots of regexes. Four characters for exponentiation. I find being at the back of the pack terribly motivating...
286.51 Matt Johnson Sun Oct 6 15:51:33 2002
-alp @n = qw'z o tw th fo fi si se ei ni te el tl h x m b';@a{@n}=(0..12,qw'*100+ )*1e3+( )*1e6+( )*1e9+(');for(@F){s/y/*10+/;s/een/+10/;s/wel/l/;s/tho/x/}for$q(@F){map{$q=~s/^$_\w+/$a{$_}/}@n}$_=join'',@F,')';s/\+\)/+0\)/g;$_=eval('('x(tr/)//-tr/(//).$_);1while s/^(\d+)(\d{3})/$1,$2/;
A few more improvements.
287.51 Scott Hall Sun Oct 6 21:34:53 2002
-aln %s="te10el11z0one1tw2thr3thi3fo4fi5si6se7ei8ni9"=~/(\D+)(\d+)/g;
%m=qw(tho 1e3 mil 1e6 bil 1e9);
$s=join"|",%s;$m=join"|",%m;
for(@F){/$s/&&($t+=$s{$&}*(/ty/?10:1));/lv|een/&&($t+=10);/hun/&&($t*=100);
/$m/&&($t*=$m{$&},$u+=$t,$t=0)};
$_=$t+$u;s/.*\d(?=\d{3})/$&,/while/\d{4}/;print
Time to golf it down.
290.56 Sheldon Fuchs Tue Oct 8 05:01:28 2002
@s=qw~z/0 wel/12 el/11 te/+10 th[^o]/3 m/|10**6| th/|1000| b/|10**9| hu/*100+ one/1 tw/2 fo/4 fi/5 si/6 se/7 ei/8 ni/9 ty/0+ [a-z]/~;map{for$a(@s){eval"s/$a/g"}@a=map{s/\+ ?$//;eval}split/\|/;$_='';$_+=$a*$b while$a=shift@a,$b=shift@a;$_=eval;$_+=$a;s/(\d)(?=(\d{3})+$)/$1,/g;print"$_\n"}<>
290.60 Eric Roode Tue Oct 8 21:08:27 2002
-anl %m=qw/tho 3 mil 2 bil 1/;%v=qw/on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 10 el 11/;*q=\$a[4];for(@F){/((..).)/;if($m=$m{$1}){$a[$m]="$q,";$a[$m]='000,'while++$m<4;$q='000';$b=1}else{$a=$v{$2};/tee|lv/and$a+=10;/ty/and$a*=10;$q+=$a;/dr/and$q*=100;$q=sprintf'%03d',$q if$b}}print@a
Not good, but it gets me on the board.
293.48 Danny Rathjens Sun Oct 6 19:29:07 2002
-lap $n="00bi00mi00th00";$s;@d{on,el}=(1,1);$d{$_}=2+$i++for qw(tw th fo fi si se ei ni te);for(@F){($p)=/(^..)/;$s+=$d{$p}*10 if/y/;$s+=$d{$p}+10 if/e(l|en)/;$s*=100 if/hu/;$s+=$d{$p}if!/(.{6}|y)/;$n=~s/$p/$s,/,$s=0 if/[hi]o/}$n.=$s;$_=$n;s/[bmt][ih]/0,/g;s/,0+(\d{3})\b/,$1/g;s/^[0,]{1,14}//
first working solution
299.58 Matt Johnson Sun Oct 6 14:53:56 2002
-alp %a=qw'z 0 o 1 tw 2 th[ir] 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 10 el 11 tl 12 h *100+ tho )*1e3)+( m )*1e6)+( b )*1e9+(';for(@F){s/y/*10+/;s/een/+10/;s/wel/l/}for$q(@F){map{$q=~s/^$_\w+/$a{$_}/}keys%a}$_=join'',@F,')';$_='('x(tr/)//-tr/(//).$_;s/\+\)/+0\)/g;$_=eval;1while s/^(\d+)(\d{3})/$1,$2/;
301.65 Chris Dolan Sat Oct 5 07:38:21 2002
-lp s/(\w+)teen/1$1/g;s/ty/0/g;split/ /," zero one two?e?n? thi?re?e? fou?r fif?v?e? six seven eight? nine ten eleven twelve";s/$x/$#_/gwhile$x=pop@_;split/ /,"   hundred thousand   million   billion";($x=pop@_)&&s/([^^I]*) $x/($1)*1e$#_^I/gwhile@_;s/\s+([^)])/+$1/g;$_=eval;1while s/(\d)(..\d)\b/$1,$2/
Simple improvements
302.56 Stanislav Svirid Tue Oct 8 06:53:22 2002
-nl @d=qw(z o tw th fo fi si se ei n te el);%h=qw(tho 3 m 6 b 9);for(split/\s/){$r+=$s*"1e$h{$1}",$s=0,next if/\b(tho|m|b)/;$s*=100,next if/\bh/;$f=1;$q=$_;$e=grep{$f&&($q=~/^$_/?$f=0:1)}@d;$e*=10 if/ty\b/;$e+=10 if/(een|lve)\b/;$s+=$e if$e>=0;}$r+=$s if$e>=0;1 while$r=~s/(\d+)(\d{3})/$1,$2/g;print$r;
one line solution :)
306.45 Marius Ascheberg Mon Oct 7 11:19:27 2002
$s=<>;%h=(z,0,o,++$f,two,2,'th(?!o)',3,fo,4,fi,5,si,6,se,7,ei,8,n,9,te,10,el,11,twel,12,twen,2,h,1e2,tho,1e3,mi,1e6,b,1e9);while($s=~s/\s?(\w+)$//){$_=$1;for$r(keys%h){$h{$r}>=100?($f=$h{$r}>$f?$h{$r}:$f*$h{$r}):($g+=$f*($h{$r}+(/een/?10:0))*(/y/?10:1))if/^$r/}}1while$g=~s/(\d)(...)(,|$)/$1,$2/;print$g.$/
Old solution fails for new test 47. This one is ok and slightly shorter.
309.56 Matt Johnson Sun Oct 6 12:06:36 2002
-ap %a=qw'z 0 o 1 tw 2 th[ir] 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 10 el 11 tl 12 h *100+ tho )*1e3)+( m )*1e6)+( b )*1e9+(';for(@F){s/ty/*10+/;s/teen/+10/;s/wel/l/}for$q(@F){map{$q=~s/^$_\w+/$a{$_}/}keys%a}$_=join('',@F).')';$_='('x(tr/)//-tr/(//).$_;s/\+\)/+0\)/g;$_=eval()."\n";1while s/^(\d+)(\d{3})/$1,$2/;
Slightly more aggressive.
310.46 Jeremy Leader Sat Oct 12 00:12:12 2002
-apl %n=(6,3,34,6,79,9);map{$x*=100if/^h/;$s=$j=248;map{$s^=++$j*ord}split//;$s%=90;for($q=20;$q*((map{-32+ord}split//,"`+5EHa!8\"*?#Tn32(Ck]")[$q-1]ne$s);$q--){};$q=$q||{5,30,49,40,87,50,0,60,30,70,42,80,38,90}->{$s};$x+=$q if$q;$y+=$x*10**$n{$s},$x=0if$n{$s}}@F;$_=$y+$x;while(s/([^,])(...)(,|$)/$1,$2$3/g){}
OK, now I'm starting to move up the board a bit!
312.64 Chris Dolan Sat Oct 5 07:29:44 2002
-lp s/(\w+)teen/1$1/g;s/(\w+)ty/${1}0/g;split/ /," zero one two?e?n? thi?re?e? fou?r fif?v?e? six seven eight? nine ten eleven twelve";s/$x/$#_/gwhile$x=pop@_;split/ /,"   hundred thousand   million   billion";($x=pop@_)&&s/([^^I]*) $x/($1)*1e$#_^I/gwhile@_;s/\s+([^)])/+$1/g;$_=eval;1while s/(\d)(\d\d\d)\b/$1,$2/
Preliminary shortening

Congratulations, Chris. Looks like you're the only one awake (including me)

313.45 Marius Ascheberg Sat Oct 5 18:13:05 2002
$s=<>;$f=1;%h=(z,0,o,1,two,2,'th[^o]',3,fo,4,fi,5,si,6,se,7,ei,8,n,9,te,10,el,11,twel,12,twen,2,h,1e2,tho,1e3,mi,1e6,b,1e9);while($s=~s/\s?(\w+)$//){$_=$1;for$r(keys%h){/^$r/?($h{$r}/10>=10?($f=$h{$r}>$f?$h{$r}:$f*$h{$r}):($g+=$f*$h{$r}*(/ty$/?10:1)+(/een$/?10:0))):0}}1while$g=~s/(\d)(...)(,|$)/$1,$2/;print$g.$/
315.43 Matt Diephouse Tue Oct 8 22:49:29 2002
-l %s=qw(d 2 y 1 t 3 m 6 b 9);map{$$_=2+$s++}qw(tw th fo fi si se ei ni);$_=<>;s/\n/  /;while(s/(.+?(m|t|b)\S+(on|d)|.+)\s//){$n=$1;$p=$2;$f+=10**($s{$p}+$s{$4})*(($1=~/z/?0:$$2||1)+($1=~/ten|([^s]..en|lve)/&&($1?10:9))||0)while$n=~s/((..)(.*?(y|d|n)|\S+))\s//}$_="$_,$1"while$f=~s/(.+?)((...)*)$/$2/;s/ ?,//;print;
315.43 IainT Fri Oct 11 08:33:59 2002
-lp $"='\w+';s/b/1e9/;s/m/1e6/;s/il$"//g;s/tho$"/1e3/;s/(($" hu$" )?$"( $")?) (1e.)/($1)*$4+/g;s/hu$"/*100/g;s/ty/*10/g;s/tee?n/+10/;s/twel$"/+12/g;s/tw$"/+2/g;s/el$"/+11/;s/ni$"/+9/g;s/ei$"/+8/;s/six/+6/g;s/s$"/+7/;s/fi$"/+5/g;s/f$"/+4/g;s/th$"/+3/g;s/one/+1/g;s/(z.+|\+)$/+0/;$_=eval;1while
s/^(\d+)(\d{3})/$1,$2/
Just a tiebreak change. What sort of silly programming language accepts $" as a valid variable name anyway? :)
315.48 IainT Thu Oct 10 13:14:21 2002
-lp $a='\w+';s/b/1e9/;s/m/1e6/;s/il$a//g;s/tho$a/1e3/;s/(($a hu$a )?$a( $a)?) (1e.)/($1)*$4+/g;s/hu$a/*100/g;s/ty/*10/g;s/tee?n/+10/;s/twel$a/+12/g;s/tw$a/+2/g;s/el$a/+11/;s/ni$a/+9/g;s/ei$a/+8/;s/six/+6/g;s/s$a/+7/;s/fi$a/+5/g;s/f$a/+4/g;s/th$a/+3/g;s/one/+1/g;s/(z.+|\+)$/+0/;$_=eval;1while
s/^(\d+)(\d{3})/$1,$2/
Lunchtime inspiration strikes and I manage to get rid of a few more strokes with some variable substitution, and the elimination of a spurious pair of parentheses.

300 isn't far now. Keep it up!

322.47 IainT Thu Oct 10 09:54:22 2002
-lp s/b/1e9/;s/m/1e6/;s/il\w+//g;s/tho\w+/1e3/;s/((\w+ hu\w+ )?\w+( \w+)?) (1e.)/(($1)*$4)+/g;s/hu\w+/*100/g;s/ty/*10/g;s/tee?n/+10/;s/twelve/+12/g;s/tw\w+/+2/g;s/el\w+/+11/;s/nine/+9/g;s/ei\w+/+8/;s/six/+6/g;s/s\w+/+7/;s/fi\w+/+5/g;s/f\w+/+4/g;s/th\w+/+3/g;s/one/+1/g;s/(z.+|\+)$/+0/;$_=eval;1while
s/^(\d+)(\d{3})/$1,$2/
Discovered the -p switch! Quite like this solution, with the exception of the single 'eval' statement the program now consists entirely of s/// regular expressions.

-p is good

328.47 Jeremy Leader Sat Oct 12 00:00:38 2002
-apl @m=(64,11,21,37,40,65,1,24,2,10,31,3,52,78,19,18,8,35,75,61);%n=(6,3,34,6,79,9);map{$x*=100if/^h/;$s=$j=248;map{$s^=++$j*ord}split//;$s%=90;for($q=@m;$q*($m[$q-1]ne$s);$q--){};$q=$q||{5,30,49,40,87,50,0,60,30,70,42,80,38,90}->{$s};$x+=$q if$q;$y+=$x*10**$n{$s},$x=0if$n{$s}}@F;$_=$y+$x;while(s/([^,])(...)(,|$)/$1,$2$3/g){}
332.49 ocbMaurice Mon Oct 7 01:58:43 2002
$_="zeontwthfofisiseeiniteel";$n{$&}=$C++while s/..//;%o=(hun=>100,tho=>1000,mil=>10**6,bil=>10**9);foreach(split(" ",<>)){$w=$o{substr($_,0,3)};if($w){if($l>$w){$z+=$c;$c=0}$c=($c+$p)*$w;$p=0;$l=$w}else{$m=$n{substr($_,0,2)};$m*=10if/ty$/;$m+=10if/een|wel/;$p+=$m}}$_=($z+$c+$p);while(s/\d{1,3}$//){$q=$&.$Q.$q;$Q=','}print$q."\n";
332.59 Eike Grote Sat Oct 5 15:41:19 2002
-nla $t{$_}=$i++for zero,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve;@g=(fif,six,seven,eigh,nine);$t{$_.teen}=$i++for thir,four,@g;$t{$_.ty}=$i,$i+=10for twen,thir,'for',@g;for(@F){$g+=$t{$_};$g*=100if/^h/;$x+=$g*1e3,$g=0if/a/;$x+=$g*1e6,$g=0if/m/;$x+=$g*1e9,$g=0if/b/}$_=$x+$g;1while s/^(\d+)(\d{3})/$1,$2/;print
better (simpler) algorithm - better score...
336.47 Jeremy Leader Fri Oct 11 23:38:35 2002
-apl @m=(64,11,21,37,40,65,1,24,2,10,31,3,52,78,19,18,8,35,75,61);%n=(6,3,34,6,79,9);map{$s=$j=248;map{$s^=++$j*ord}split//;$s%=90;for($q=@m;$q*($m[$q-1]ne$s);$q--){};$q=$q||{5,30,49,40,87,50,0,60,30,70,42,80,38,90}->{$s};if($q){$x+=$q}else{$x*=100if/^h/;$y+=$x*10**$n{$s},$x=0if$n{$s}}}@F;$_=$y+$x;while(s/([^,])(...)(,|$)/$1,$2$3/g){}
Step by step, asymptotically approaching mediocrity.
340.58 Sheldon Fuchs Tue Oct 8 04:41:53 2002
@s=qw~0z 12wel 11el +10te 3th[^o] |10**6|m |10**3|th |10**9|b *100+hu 1one 2tw 4fo 5fi 6si 7se 8ei 9ni 0+ty~;map{for$a(@s){($b,$s)=$a=~/([^a-z]+)(.+)/;eval s/$s/$b/g}s/[a-z]//g;@a=reverse map{s/\+\s?$//;eval}split/\|/;$_='';$_.="+".$a*$b while$a=pop@a,$b=pop@a;$_=eval;$_+=$a;s/(\d)(?=(\d{3})+$)/$1,/g;print"$_\n"}<>


^I
^I
^I
^I
^I
^I
^I
^I
^I
^I
^I
^I

344.44 Matt Diephouse Tue Oct 8 22:10:48 2002
-l %s=qw(d 2 y 1 t 3 m 6 b 9);%c=map{$_,2+$s++}qw(tw th fo fi si se ei ni);$n=<>;$n=~s/\n/  /;while($n=~s/(.+?(m|t|b)\S+(on|d)|.+)\s//){my$a;$_=$1;while(s/((\S\S)(.*?(y|d|n)|\S+))\s//){$a+=($1=~/z/?0:$c{$2}||1)*10**$s{$4};$a+=9 if$1=~/ten/;$a+=10 if$1=~/[^s]..en|lve/}$f+=10**$s{$2}*$a}$m="$m,$1"while$f=~s/(.+?)((...)*)$/$2/;$m=~s/,//;print$m;
345.51 Jeremy Leader Fri Oct 11 18:35:33 2002
-apl %m=(4,1,53,2,89,3,30,4,68,5,80,6,92,7,31,8,78,9,56,10,36,11,63,12,46,13,9,14,25,15,74,16,91,17,40,18,2,19,3,20,39,30,15,40,81,50,26,60,79,70,37,80,86,90);%n=(33,3,6,6,88,9);map{$s=$j=84;map{$s^=++$j*ord}split//;$s%=95;if($m{$s}){$x+=$m{$s}}else{$x*=100if/^h/;$y+=$x*10**$n{$s},$x=0if$n{$s}}}@F;$_=$y+$x;while(s/([^,])(...)(,|$)/$1,$2$3/g){}
I still suck, just a tiny bit less.
346.58 GONZO Fri Oct 11 15:03:37 2002
-lap %e=qw(zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5 b 9-$s m 6-$s o 3-$s u 2-$s%3 y 1-$s%3,$e{$k},2-$s%3 1 0,"1$e{$k}",2 0 0,$e{$k},1);while($_=pop@F){/(.).(.)/;$k=$1.$2;$K=/(b|m|y)|h(u|o)/?$+:/el|te/?1:0;eval"r($e{$K})"}sub r{($a,$b,$c)=@_;$o=$b.0 x$a.$o;$s+=$c?$c:$a}$_=$o;1while s/(\d)(\d{3}(,|$))/$1,$2/
350.50 Sheldon Fuchs Mon Oct 7 20:00:46 2002
@s=qw~0z 12wel 11el Mm Ttho Bb *100+hu 1one 2tw 3th 4fo 5fi 6si 7se 8ei 9ni 0+ty +10te~;for(<>){for$r(@s){($b,$s)=$r=~/([^a-z]+)(.+)/;eval"s/$s/$b/g"}s/[a-z]//g;my$y="(($1)*10**9)+"if s/([^B]+)B//g;my$m="(($1)*10**6)+"if s/([^M]+)M//g;my$g="(($1)*1000)+"if s/([^T]+)T//g;$_=$y.$m.$g.$_;s/\+($| (\D))/$2/g;$_=eval;s/(\d)(?=(\d{3})+$)/$1,/g;print$_.$/}
354.58 Philippe Bricout Sun Oct 6 22:11:28 2002
-pl %t=qw#ze 0 on 1 tw 2 th 3 fo 4 fi 5 si 6 se 7 ei 8 ni 9 te 0 el 11#;
%e=qw#b 9 m 6 tho 3#;
sub _{
^I$a=pop;
^I($b)=($a=~/(..)/);
^Ireturn 10* $t{$b} if $a=~/ty/;
^Ireturn 10+ $t{$b} if $a=~/te|lv/;
^I$t{$b}
}
1while s/([^()]*?) (b|m|tho)\w+ ?([^()]*)/($1)*10**$e{$2}+($3)/;
s/(\w+) h\w+/100*_$1/eg;
s/([a-z]+)/+_($1)/g;
$_=eval;
s/(\d)(?=(\d{3})+$)/$1,/g;
355.59 GONZO Thu Oct 10 21:40:07 2002
-lap %e=qw(zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5 b 9-$s m 6-$s ho 3-$s hu 2-$s%3 y 1-$s%3,$e{$k},2-$s%3 el 0,"1$e{$k}",2 1 0,$e{$k},1);while($_=pop@F){/(.).(.)/;$k=$1.$2;$_=/(b|m|ho|hu|y|el|te)/?$1:1;s/te/el/;eval"r($e{$_})";}sub r{$o=$_[1].0 x$_[0].$o;$s+=$_[2]?$_[2]:$_[0]}$_=$o;1while s/(\d)(\d{3}(,|$))/$1,$2/
356.51 IainT Thu Oct 10 08:30:38 2002
-ln s/b/1e9/;s/m/1e6/;s/il\w+//g;s/tho\w+/1e3/;
s/((\w+ hu\w+ )?\w+( \w+)?) (1e.)/(($1)*$4)+/g;
s/hu\w+/*100/g;
s/ty/*10/g;
s/teen/+10/;
s/twelve/+12/g;
s/tw\w+/+2/g;
s/el\w+/+11/;
s/ten/+10/;
s/nine/+9/g;
s/ei\w+/+8/;
s/six/+6/g;
s/s\w+/+7/;
s/fi\w+/+5/g;
s/f\w+/+4/g;
s/th\w+/+3/g;
s/one/+1/g;
s/(z.+|\+)$/+0/;
$_=eval;1while s/^(\d+)(\d{3})/$1,$2/;print
Shaving off strokes here & there ... the order of the s/// expressions is important, now.
356.61 Chris Dolan Sat Oct 5 07:01:34 2002
-lp s/(\w+)teen/1$1/g;s/(\w+)ty/${1}0/g;%r=split/(\d+)/,"zero00one1two2three3four4five5six6seven7eight8nine9ten10eleven11twelve12thir3fif5eigh8twen2for4";s/[a-z]+/$r{$&}||$&/ge;s/([^^I]*) billion/($1)*1e9^I/g;s/([^^I]*) million/($1)*1e6^I/g;s/([^^I]*) thousand/($1)*1e3^I/g;s/([^^I]*) hundred/($1)*1e2^I/g;s/\s+([^)])/+$1/g;$_=0+eval;1while s/(\d)(\d\d\d)\b/$1,$2/
Nope, I pasted it badly (tabs->spaces). Try again...
358.51 gimbo Sat Oct 5 22:45:07 2002
-l %t=(103,15,111,14,96,2,26,90,71,-1e6,5,16,19,-1e3,112,60,14,80,12,1,36,12,58,20,79,17,59,4,98,3,9,6,39,13,35,7,99,10,7,11,4,30,60,0,8,9,43,19,28,5,2,50,29,-1e9,54,40,106,70,75,-1,73,18,45,8);$_=<>;map{if(/ /){($n=$t{$c})>0?($s+=$n):(~$n?($t+=$s*-$n,$s=0):($s*=100));$c=0}else{$c=($c*26-97+ord)%118}}/./g,$";$_=$s+$t;s/.(?=.)/(length$')%3?$&:"$&,"/eg;print
I don't think I understand this one...
363.60 GONZO Thu Oct 10 19:28:05 2002
-lap %e=qw(zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5 b 9-$s m 6-$s ho 3-$s hu 2-$s%3 y 1-$s%3,$e{$k},2-$s%3 el 0,$e{$k}.1,2 1 0,$e{$k},1);while($_=pop@F){/^(.).(.)/;$k=$1.$2;/(b|m|ho|hu|y|el|te)/;$_=$2?1:$1;s/te/el/;eval"r($e{$_})";}sub r{$o.=0 x$_[0].$_[1];$s+=$_[2]?$_[2]:$_[0]}$o=~s/(\d{3})(?=\d)/$1,/g;$_=scalar reverse$o
368.60 GONZO Thu Oct 10 18:59:00 2002
-lap %e=qw(zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5 b 9-$s m 6-$s ho 3-$s hu 2-$s%3 y 1-$s%3,$e{$k},2-$s%3 el 0,$e{$k}.1,2 1 0,$e{$k},1);while($_=pop@F){/^(.).(.)/;$k=$1.$2;/(b|m|ho|hu|y|el|te)/;$q=$2?1:$1;$q=~s/te/el/;eval"r($e{$q})";}sub r{$o.=0 x$_[0].$_[1];$s+=$_[2]?$_[2]:$_[0]}$o=~s/(\d\d\d)(?=\d)/$1,/g;$_=scalar reverse$o
I overtook Johannes Singler!!! First little success...
368.70 Yanick Champoux Sun Oct 6 14:44:49 2002
-pl for(reverse split){$y.=0 x(($1eq'm'?6:9)-length$y)if/(m|b)illion/;$y.=0 x( 3 - length $y )if/thousand/;$y.=0 x(2-(length$y)%3)if/hundred/;/ty/and!((length $y)%3)and$y.=0;for$i(%n=qw/zero 0 one 1 two 2 three 3 fou?r 4 fi(f|ve) 5 six 6 seven 7 eight 8 nine 9 ten 01 eleven 11 twelve 21 twen 2 thir 3/){$y.=$n{$i}if/$i/}$y.=1if/teen/}$y=~s/...(?=.)/$&,/g;$_=reverse$y
Big, ugly, but at least it's a start.
369.49 Johannes Singler Thu Oct 10 16:20:08 2002
for(split/ /,<>){
^I$i=1;
^Iforeach $d(qw/o tw(o|en) th(i|r) fo fi si se ei n te el twel/){
^I^Iif(/^$d/){$x+=$i;}
^I^I$i++;
^I}
^Iif(/tee/){$x+=10;}
^Iif(/ty/){$x*=10;}
^Iif(/^h/){$y=$x*1e2;$x=0;}
^Iif(/^tho/){$n+=($x+$y)*1e3;$x=$y=0;}
^Iif(/^m/){$n+=($x+$y)*1e6;$x=$y=0;}
^Iif(/^b/){$n+=($x+$y)*1e9;$x=$y=0;}
}
$_=$n+$x+$y;
s/\G(\d{1,3})(?=(?:\d\d\d)+(?!\d))/$1,/g;
print $_,"\n";
Second try.
376.59 GONZO Thu Oct 10 18:48:42 2002
-lap %e=qw(zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5);%p=qw(b 9-$s m 6-$s ho 3-$s hu 2-$s%3 y 1-$s%3,$e{$k},2-$s%3 el 0,$e{$k}.1,2 1 0,$e{$k},1);$p{te}=$p{el};while($_=pop@F){/^(.).(.)/;$k=$1.$2;/(b|m|ho|hu|y|el|te)/;$q=$2?1:$1;eval"r($p{$q})";}sub r{$o.=0 x$_[0].$_[1];$s+=$_[2]?$_[2]:$_[0]}$o=~s/(\d\d\d)(?=\d)/$1,/g;$_=scalar reverse$o
379.58 IainT Wed Oct 9 15:20:12 2002
-ln s/billion/1e9/;s/million/1e6/;s/thousand/1e3/;
s/((\w+ hundred )?\w+( \w+)?) (1e.)/(($1)*$4)+/g;
s/hundred/*100/g;
s/ty/*10/g;
s/teen/+10/;
s/twelve/+12/g;
s/eleven/+11/;
s/ten/+10/;
s/nine/+9/g;
s/eight?/+8/;
s/seven/+7/;
s/six/+6/g;
s/fi(ve|f)/+5/g;
s/fou?r/+4/g;
s/th(ree|ir)/+3/g;
s/tw(o|en)/+2/g;
s/one/+1/g;
s/(zero|\+)$/+0/;
$_=eval;1while s/^(\d+)(\d{3})/$1,$2/;print
Now we're getting somewhere ... :)
379.65 Stanislav Svirid Tue Oct 8 06:51:02 2002
-nl @d=qw(z o tw th fo fi si se ei n te el);
%h=qw(tho 3 m 6 b 9);
for(split/\s/) {
        $r+=$s*"1e$h{$1}",$s=0,next if/\b(tho|m|b)/;
        $s*=100,next if /\bh/;
        $f=1;$q=$_;
        $e = grep{$f&&($q=~/^$_/?$f=0:1)}@d;
        $e*=10 if/ty\b/;
        $e+=10 if/(een|lve)\b/;
        $s+=$e if $e>=0;
}
$r+=$s if $e>=0;
1 while $r=~s/(\d+)(\d{3})/$1,$2/g;
print $r;
first shot (third place ;-)
384.47 Mike Vyricheck Fri Oct 11 16:36:05 2002
$_=<STDIN>;
$_=" $_";
~s/(\w+)een/1$1/g;
~s/(\w+)ty/$1*10/gx;
foreach $k (map qr/$_/, map '([\s\d])'.$_.'\w{0,}', qw(z o tw(o|en) th[ri] fo fi si se ei n ten el twel)){
~s/$k/$1$i/gx;^I
$i++;
}
~s/\sh\w+/*100/g;
~s/(\d)\s(\d)/$1+$2/g;
~m/((.*?)b\w+\s?)?((.*?)m\w+\s?)?((.*?)t\w+\s?)?(.*)?/;
map eval('$r.=",".sprintf("%03d",'.$_.")"),($2,$4,$6,$7);
$r=~s/^[0,]+(.+)/$1/;
print $r."\n";
First pankake is always like a snowball...
384.57 GONZO Thu Oct 10 17:58:57 2002
-lap %e=qw{zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5};while($_=pop@F){/^(.).(.)/;$k=$1.$2;if(/b/){r(9-$s)}elsif(/m/){r(6-$s)}elsif(/ho/){r(3-$s)}elsif(/hu/){r(2-$s%3)}elsif(/y/){r(1-$s%3,$e{$k},2-$s%3)}elsif(/el|te/){r(0,$e{$k}.1,2)}else{r(0,$e{$k},1)}}sub r{$o.=0 x$_[0].$_[1];$s+=$_[2]?$_[2]:$_[0]}$o=~s/(\d\d\d)(?=\d)/$1,/g;$_=scalar reverse$o
391.56 Jeremy Leader Thu Oct 10 22:31:25 2002
-apl %m=(90,0,412,1,471,2,415,3,47,4,66,5,457,6,617,7,614,8,98,9,500,10,807,11,21,12,510,13,390,14,243,15,188,16,740,17,395,18,459,19,159,20,197,30,611,40,523,50,580,60,926,70,176,80,240,90);%n=(102,3,990,6,977,9);map{$a=$s=$j=0;map{$s^=++$j*ord}split//;$x+=$m{$s},$a=1if$m{$s};$x*=100,$a=1 if$_=~/^h/;$y+=$x*10**$n{$s},$x=0 if!$a&&$n{$s}}@F;$y+=$x;$_=reverse$y;s/.../$&,/g;$_=reverse;s/^,//
I started late, I should try printf %v.
403.55 GONZO Thu Oct 10 17:27:10 2002
-lap %e=qw{zr 0 oe 1 to 2 tr 3 fu 4 fv 5 sx 6 sv 7 eg 8 nn 9 tn 0 ee 1 te 2 ti 3 fr 4 ff 5};while($_=pop@F){/^(.).(.)/;$k=$1.$2;if(/b/){$o.=0 x(9-$s);$s=9}elsif(/m/){$o.=0 x(6-$s);$s=6}elsif(/ho/){$o.=0 x(3-$s);$s=3}elsif(/hu/){$n=2-$s%3;$o.=0 x$n;$s+=$n}elsif(/y/){$o.=0 x(1-$s%3).$e{$k};$s+=2-$s%3}elsif(/el|te/){$o.="$e{$k}1";$s+=2}else{$o.=$e{$k};$s++}}$o=~s/(\d\d\d)(?=\d)/$1,/g;$_=scalar reverse$o
412.55 Eike Grote Sat Oct 5 15:12:43 2002
-ln $t{$_}=$i++for zero,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve;@g=(fif,six,seven,eigh,nine);$t{$_.teen}=$i++for thir,four,@g;$t{$_.ty}=$i,$i+=10for twen,thir,'for',@g;s/(\D*) b\w+/$n+=x($1)*1e9/e;s/(\D*) m\w+/$n+=x($1)*1e6/e;s/(\D*) tho\w+/$n+=x($1)*1e3/e;$_=$n+x($_);1while s/^(\d+)(\d{3})/$1,$2/;print;sub x{$q=0;$_=pop;s/([a-z]*) h\w+/$q+=$t{$1}*100/e;1while s/[a-z]+/$q+=$t{$&}/eg;$q}
first shot...

he shoots, he scores

439.56 IainT Wed Oct 9 15:07:51 2002
-ln s/((\w+ hundred )?\w+( \w+)?) billion/(($1)*1e9)+/;
s/((\w+ hundred )?\w+( \w+)?) million/(($1)*1e6)+/;
s/((\w+ hundred )?\w+( \w+)?) thousand/(($1)*1e3)+/;
s/hundred/*100/g;
s/ty/*10/g;
s/teen/+10/;
s/twelve/+12/g;
s/eleven/+11/;
s/ten/+10/;
s/nine/+9/g;
s/eight?/+8/;
s/seven/+7/;
s/six/+6/g;
s/fi(ve|f)/+5/g;
s/fou?r/+4/g;
s/th(ree|ir)/+3/g;
s/tw(o|en)/+2/g;
s/one/+1/g;
s/(zero|\+)$/+0/;
$_=eval;1while s/^(\d+)(\d{3})/$1,$2/;print
New algorithm (look ma! it's all done with regexes!), already started reducing it but we'll see how better I can get it.
444.49 ocbMaurice Mon Oct 7 00:52:26 2002
%n=(ze=>0,on=>1,tw=>2,th=>3,fo=>4,fi=>5,si=>6,se=>7,ei=>8,ni=>9,te=>10,el=>11);
%o=(hun=>100,tho=>1000,mil=>10**6,bil=>10**9);
foreach(split(" ",<>)) {$N=$n{substr($_,0,2)};$m=$N;if(/ty$/){$m=10*$N}elsif(/lve|een|twe/){$m=10+$N}$_=substr($_,0,3);
if($o{$_}){if($l>length$o{$_}){$z+=$c;$c=$p*$o{$_}}else{$c=($c+$p)*$o{$_}}$p=0;$l=length($o{$_})}else{$p+=$m}}
my $a=reverse($z+$c+$p);while($a=~s/([0-9]{3})([^,])/$1,$2/){}print((reverse$a)."\n");
462.60 pk Fri Oct 11 15:11:58 2002
-ln @p=split/ /,'bi mi tho hu irty rty fty xty venty hty ety wen et hte nte xte ft urt rt twe el te ni ei se si fi fo th tw on z';
@l=split/ /,'))*1000000000+((+0 ))*1000000+((+0 ))*1000+(+0 )*100+(+0';
for$i(30..90){push@l," +$i"if($i%10==0)};for$i(0..20){push @l," +".(20-$i)};
for$r(@p){$l=shift@l;s/[a-z]*$r[a-z]*/$l/g;}
$_=eval"(($_)"||eval"($_)"||eval"($_))"||eval"(($_))";
s/(.)(...)$/$1,$2/g;
s/(.)(...,)/$1,$2/g;
s/(.)(...,)/$1,$2/g if length>11;
print;
481.53 Danny Sadinoff Wed Oct 9 13:26:15 2002
-lap for(@F){/hun/&&do{$n*=100;next;};/tho/&&do{$a+=$n*1e3;$n=0;next};/mil/&&do{$a+=$n*1e6;$n=0;next};/bil/&&do{$a+=$n*1e9;$n=0;next};$o=0;/ten/and$o=10;/ele/and$o=11;/twe/and$o=12;/ty/&&do{/tw/and$o=2;/th/and$o=3;/fo/and$o=4;/fi/and$o=5;/si/and$o=6;/se/and$o=7;/ei/and$o=8;/ni/and$o=9;$o*=10;goto A};/on/and$o++;/wo/and$o+=2;/th/and$o+=3;/fo/and$o+=4;/fi/and$o+=5;/si/and$o+=6;/se/and$o+=7;/ei/and$o+=8;/ni/and$o+=9;/tee/and$o+=10;A:$n+=$o}$_=$n+$a;1while s/^(-?\d+)(\d{3})/$1,$2/
First pass, simplest possible algorithm, with the commafication stolen from the faq

Is this the first "goto" in perl golf?

482.66 Matthias Schoder Thu Oct 10 05:52:45 2002
-ln %n=(billion,1E9,eight,8,eighteen,18,eighty,80,eleven,11,fifteen,15,fifty,50,five,5,forty,40,four,4,fourteen,14,hundred,100,million,1E6,nine,9,nineteen,19,ninety,90,one,1,seven,7,seventeen,17,seventy,70,six,6,sixteen,16,sixty,60,ten,10,thirteen,13,thirty,30,thousand,1E3,three,3,twelve,12,twenty,20,two,2);$r=$n=0;while(/(\w+)/g){$t=$1;if($t =~ /^(m|b|tho)/){$r+=$n*$n{$t};$n=0;}elsif($t=~/^h/){$n*=100;}else{$n+=$n{$t}}}$r+=$n;$_="$r ";1while s/(\d)(\d\d\d) /$1 ,$2/;s/ //;print
488.64 pk Fri Oct 11 14:16:12 2002
-ln @p=split/ /,'bi mi tho hu irty rty fty xty venty hty ety wen twe irt urt ft xte nte hte et z on tw th fo fi si se ei ni te el';
@l=split/ /,'))*1000000000+((+0 ))*1000000+((+0 ))*1000+(+0 )*100+(+0 +30 +40 +50 +60 +70 +80 +90 +20 +12 +13 +14 +15 +16 +17 +18 +19 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11';
for$r(@p){$l=shift@l;s/[a-z]*$r[a-z]*/$l/g;}
$_=eval"(($_)"||eval"($_)"||eval"($_))"||eval"(($_))";
s/(.)(...)$/$1,$2/g;
s/(.)(...,)/$1,$2/g;
s/(.)(...,)/$1,$2/g if length>11;
print;
512.51 Matt Johnson Sun Oct 6 11:32:29 2002
@a = reverse split(/\s/,<>);
%a = (z,0,o,1,'tw',2,'th[ir]',3,fo,4,fi,5,si,6,se,7,ei,8,ni,9,te,10,el,11,tl,12);
%b = ('h','*100+','tho',')*1e3)+(','m',')*1e6)+(','b',')*1e9)+(');
foreach(@a){s/ty/*10+/;s/teen/+10/;s/twel/tl/}
foreach $q (@a) {map{$q=~s/^$_\w+/$a{$_}/} keys %a}
foreach $q (@a) {map{$q=~s/^$_\w+/$b{$_}/} keys %b}
$f = join('',reverse@a) .')';
$f = '(' x ($f=~tr/)// - $f=~tr/(//) . $f;
$f =~ s/\+\)/+0\)/g;
# print "F: $f\n";
$g = eval($f);
1 while $g=~s/^([-+]?\d+)(\d{3})/$1,$2/;
print $g."\n";
Just a baseline solution, yet to optimize it.
545.54 IainT Wed Oct 9 14:15:51 2002
-ln map{$n{$_}=++$i}one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve;
$i=2;map{$n{$_.ty}=10*$i;$n{$_.teen}=10+$i++}twen,thir,'for',fif,six,seven,eigh,nine;
$n{fourteen}=14;print(0),exit
if/z/;$a=1e9*p($1)if s/^(.*) b/A/;$a+=1e6*p($1)if s/^(.*)m/A/;
$a+=1e3*p($1)if s/^(.*) tho/A/;$a+=100*p($1)if s/^(.*)hu/A/;
$a+=p($_);1while$a=~s/^(\d+)(\d{3})/$1,$2/;print$a;sub
p{my$n=shift;my$t=0;$n=~s/A\S+//;return 0if!$n;
$n=~s/^ *//;return$n{$n}if$n{$n};$n=~s/^(.*)hundred//;$t+=100*p($1);
if($n){$n=~/ ?(\S+)( (\S+))?/;$t+=p($1)+p($3)}$t}
Hmm, shaving off the odd stroke here & there, but that's all. Need a new algorithm if I'm going to halve my score (or better).
555.54 IainT Mon Oct 7 15:09:11 2002
-ln $n{$_}=++$i for one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve;
$i=3;for(thir,'for',fif,six,seven,eigh,nine){$n{$_.ty}=10*$i;$n{$_.teen}=10+$i++}
@n{fourteen,twenty}=(14,20);print(0),exit if/z/;
$a=1e9*p($1)if s/^(.*) b/A/;$a+=1e6*p($1)if s/^(.*)m/A/;
$a+=1e3*p($1)if s/^(.*) tho/A/;$a+=100*p($1)if s/^(.*)hu/A/;
$a+=p($_);1while$a=~s/^(\d+)(\d{3})/$1,$2/;print$a;
sub p{my$n=shift;my$t=0;$n=~s/A\S+//;return 0if!$n;
$n=~s/^ *//;return$n{$n}if$n{$n};$n=~s/^(.*)hundred//;$t+=100*p($1);
if($n){$n=~/ ?(\S+)( (\S+))?/;$t+=p($1)+p($3)}$t}
Managed to cut down regexes quite a bit, also found a shorter "printing numbers with commas" algorithm (thanks, Google!) *phew* perhaps I'll give it a rest for today now. Perhaps ... :)
587.55 Ross Younger Sat Oct 5 17:42:45 2002
-lp $m={zero=>0,one=>1,two=>2,three=>3,four=>4,five=>5,six=>6,seven=>7,eight=>8,nine=>9,ten=>10,eleven=>11,twelve=>12,thirteen=>13,fourteen=>14,fifteen=>15,sixteen=>16,seventeen=>17,eighteen=>18,nineteen=>19,twenty=>20,thirty=>30,forty=>40,fifty=>50,sixty=>60,seventy=>70,eighty=>80,ninety=>90};$C=',';sub
c{$_=pop;s/(.*) hundred ?(.*)?/100*c($1)+c($2)/e||s/(\w+) ?(\w+)?/$m->{$1}+$m->{$2}/e||s//0/;$_='0'x(3-length).$_ if$x;$_}s/(.*) billion ?/($x.=c($1).$C),""/e;s/(.*) million ?/($x.=c($1).$C),""/e||$x&&($x.="000,");s/(.*) thousand ?/($x.=c($1).$C),""/e||$x&&($x.="000,");$_=$x.c($_)
150 strokes ?!? Clearly I've overlooked something major...

I believe you have

602.54 IainT Mon Oct 7 14:26:34 2002
-l $_=<>;
$n{$_}=++$i for one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve;
$i=3;for(thir,'for',fif,six,seven,eigh,nine){$n{$_.ty}=10*$i;$n{$_.teen}=10+$i++}
@n{fourteen,twenty}=(14,20);print(0),exit if/z/;
$a=1e9*p($1)if s/^(.*) billion//;$a+=1e6*p($1)if s/^(.*)million//;
$a+=1e3*p($1)if s/^(.*) thousand//;$a+=100*p($1)if s/^(.*)hundred//;
$a+=p($_);$a=~s/(^\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;print$a;
sub p{my$n=shift;my$t=0;return 0if!$n;
$n=~s/^\s*//;return$n{$n}if$n{$n};$n=~s/^(.*)hundred//;$t+=100*p($1);
return$t if!$n;$n=~/\s?(\S+)(\s(\S+))?/;$t+=p($1)+p($3);$t}
Hmmm down to around 600-ish after realising I had an extraneous loop in the code (and some other small optimisations). Looking for a way to avoid having to code for the special cases on line 5.

catching Ross

680.54 IainT Mon Oct 7 13:35:30 2002
-l $_=<>;chomp;
$n{$_}=++$i for(one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve);
$i=3;for(thir,'for',fif,six,seven,eigh,nine){$n{$_.'ty'}=10*$i;$n{$_.'teen'}=10+$i++}
@n{fourteen,twenty}=(14,20);if(/zero/){print"0";exit}D:{
if(s/^(.*) billion//){$a=1e9*p($1);last D if!$_}if(s/^(.*) million//){$a+=1e6*p($1);last D if!$_}
if(s/^(.*) thousand//){$a+=1e3*p($1);last D if!$_}if(s/^(.*) hundred//){$a+=100*p($1)}
$a+=p($_)}$a=~s/(^\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
print"$a";sub p{my$n=shift;my$t=0;return 0if!$n;
$n=~s/^\s*//;return$n{$n}if$n{$n};$n=~s/^(.*) hundred//;$t+=100*p($1);
return$t if!$n;$n=~/\s?(\S+)(\s(\S+))?/;$t+=p($1)+p($3);return$t;}
Slowly reducing the size, still got lots of work to do though!
706.51 Philippe Bricout Sat Oct 5 10:46:45 2002
-pl %t=(
'zero'=> '0',
'one'=> '1',
'two'=> '2',
'three'=> '3',
'four'=> '4',
'five'=> '5',
'six'=> '6',
'seven'=> '7',
'eight'=> '8',
'nine'=> '9',
'ten'=> '10',
'eleven'=> '11',
'twelve'=> '12',
'thirteen'=> '13',
'fourteen'=> '14',
'fifteen'=> '15',
'sixteen'=> '16',
'seventeen'=> '17',
'eighteen'=> '18',
'nineteen'=> '19',
'twenty'=> '20',
'thirty'=> '30',
'forty'=> '40',
'fifty'=> '50',
'sixty'=> '60',
'seventy'=> '70',
'eighty'=> '80',
'ninety'=> '90',
);
s/([^()]*) billion ?([^()]*)/($1)*10**9+($2)/;
s/([^()]*) million ?([^()]*)/($1)*10**6+($2)/;
s/([^()]*) thousand ?([^()]*)/($1)*10**3+($2)/;
s/(\w+) hundred/$t{$1}*100/eg;
s/([a-z]+)/+$t{$1}/g;
$_=eval;
1 while s/(\d)(\d{3})(,|$)/$1,$2$3/;
Like the Little Regex Engine... "I think I can"... improve this solution ;-)

There _does_ seem to be some room manoeuvre

762.60 IainT Mon Oct 7 11:10:17 2002
$_=<>;chomp;
%n=(one,1,two,2,three,3,four,4,five,5,six,6,seven,7,eight,8,nine,9,ten,10,eleven,11,twelve,12,thirteen,13,fourteen,14,fifteen,15,sixteen,16,seventeen,17,eighteen,18,nineteen,19,twenty,20,thirty,30,forty,40,fifty,50,sixty,60,seventy,70,eighty,80,ninety,90);
if(/zero/){print"0\n";exit}D:{
if(s/^(.*) billion//){$a=1e9*p($1);last D unless$_}if(s/^(.*) million//){$a+=1e6*p($1);last D unless$_}
if(s/^(.*) thousand//){$a+=1e3*p($1);last D unless$_}if(s/^(.*) hundred//){$a+=100*p($1)}
$a+=p($_)}$a=~s/(^\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
print"$a\n";
sub p{my$n=shift;my$t=0;return 0 unless$n;
$n=~s/^\s*//;return$n{$n}if$n{$n};$n=~s/^(.*) hundred//;$t+=100*p($1);
return$t unless$n;$n=~/\s?(\S+)(?:\s(\S+))?/;$t+=p($1)+p($2);return$t;}
Got rid of most of extraneous spaces etc. Can't get much smaller than this ... need new algorithm :)
3279.76 IainT Mon Oct 7 10:57:09 2002
$_ = <>; chomp;
$debug = 0;
%num=(one,1,two,2,three,3,four,4,five,5,six,6,seven,7,eight,8,nine,9,ten,10,eleven,11,twelve,12,thirteen,13,
fourteen,14,fifteen,15,sixteen,16,seventeen,17,eighteen,18,nineteen,19,
twenty,20,thirty,30,forty,40,fifty,50,sixty,60,seventy,70,eighty,80,ninety,90);
if(/zero/){print"0\n";exit}
  DECODE:{
if (s/^(.*) billion//){
print "$1 is billion part, string left is $_\n"if$debug;
$total = 1000000000 * procIt($1);last DECODE unless$_;
print "running total is $total\n"if$debug;
}
if(s/^(.*) million//){
print "$1 is million part, string left is $_\n"if$debug;
$total += 1000000 * procIt($1); last DECODE unless$_;
print "running total is $total\n"if$debug;
}
if(s/^(.*) thousand//){
print "$1 is thousand part, string left is $_\n"if$debug;
$total += 1000 * procIt($1); last DECODE unless$_;
print "running total is $total\n"if$debug;
}
if(s/^(.*) hundred//){
print "$1 is hundred part, string left is $_\n"if$debug;
$total +=100 * procIt($1);
print "running total is $total\n"if$debug;
}
print "$_ is the rest\n"if$debug;
$total +=procIt($_);
print "running total is $total\n"if$debug;
}

print "\n\n"if$debug;
$total=~s/(^\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;

print "$total\n";


sub procIt() {
  my$n=shift;my$t=0;
  return 0 unless $n;
  $n=~s/^\s*//;
  print "  converted $n into $num{$n}\n"if$debug&&$num{$n};
  return $num{$n} if $num{$n};
  print "received $n\n"if$debug;
  $n=~s/^(.*) hundred//;
  print "  hundred part is $1\n"if$debug;
  $t+=100*procIt($1);
  print "  running subtotal is $t\n"if$debug;
  print "  remainder is :$n:\n"if$debug;
  return $t unless$n;
  $n=~/\s?(\S+)(?:\s(\S+))?/;
  print "  broke remainder into $1 and $2\n"if$debug;
  $t+=procIt($1)+procIt($2);
  return $t;
}











__END__
$debug =1;

%num=(one,1,two,2,three,3,four,4,five,5,six,6,seven,7,eight,8,nine,9,ten,10,eleven,11,twelve,12,thirteen,13,
fourteen,14,fifteen,15,sixteen,16,seventeen,17,eighteen,18,nineteen,19,
twenty,20,thirty,30,forty,40,fifty,50,sixty,60,seventy,70,eighty,80,ninety,90);
%mult=(hundred,100,thousand,1000,million,1000000,billion,1000000000);

$total =0;
$prev=0;
$prev_was_mult=0;
for(split/ /,<>){ chomp;$n = $_;
  print "Processing $n:\n"if$debug;
  if ($mult{$n}) {
    print "   Found a multiplier term $n\n"if$debug;
      $total-=$prev;
      print "   Deducted erroneous prev val $prev\n"if$debug;
    if ($prev_was_mult) {
    } else{
    $total+=$prev unless$prev_was_mult;
    }
    $total+=($mult{$n} * $prev);
    print "   Added multiplier $mult{$n} * prev val $prev\n"if$debug;
    print "   Storing new prev val $mult{$n} * $prev\n"if$debug;
    $prev = $mult{$n} * $prev;
    $prev_was_mult=1;
  }
  else
  { 
    print "   Found a standard term $n\n"if $debug;
    $total+=$prev unless $prev_was_mult;
    print "   Added prev val $prev\n"if$debug&&!$prev_was_mult;
    $prev = $num{$n};
    $prev_was_mult=0;
    print "   Storing new prev val $num{$n}\n"if$debug;
  }
  print "         Current running total is $total\n"if$debug;
}
$total+=$prev unless $prev_was_mult;
print "\n\n"if$debug;

#push @foo,$1 while $total =~ /(\d{3})/g;
#$total =~ /\G(\d*)/; $i = $1; print "left off = $i\n";push @foo,$i;
#$newtotal = join'',@foo;

$total=~s/(^\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;

print "$total\n";
first try (ever!), full of debugging crap and spaces and long varnames & all sorts. time to start playing...

good to see new faces

Artistic/Unorthodox

ScoreGolferSubmit TimeCode
206.48 TheodoreYoung Tue Oct 8 16:43:29 2002
-lpa $"='|';@_{@_=qw/tho m b h twel z o tw th fo f si s ei n t e/}=(map(")*10**$_+(",3,6,9),'*100',map"+$_",12,0..11);$_=eval'('.join('',map {@_{/^(@_)/},/een/&&'+10',/y/&&'*10'}@F).')';s/.(?=(...)+$)/$&,/g
This is not better than by current one, but I just love the use of @_{/^(@_)/}
386.47 GONZO Sat Oct 12 04:28:17 2002
-lap $_='zr0oe1to2tr3fu4fv5sx6sv7eg8nn9tn0ee1te2ti3fr4ff5b9-$sm6-$so3-$su2-$s%3y1-$s%3,2-$s%3,$e{$k}s0,2,"1$e{$k}"k0,1,$e{$k}';1 while s/^([a-z]+)(\d)|^((?:[-\d%{}",]|\$.)+)([a-z]+\d|$)/push@e,$1.$3;$+/e;%e=@e;while($_=pop@F){/(.).(.)/;$k=$1.$2;$K=/(b|m|y)|h(u|o)/?$+:/el|te/?'s':'k';eval"r($e{$K})"}sub r{($a,$b)=@_;$o=$_[2].0 x$a.$o;$s+=$b?$b:$a}$_=$o;1while s/(\d)(\d{3}(,|$))/$1,$2/
No real big art but I like the idea.

Rejected

ScoreGolferSubmit TimeCode
46.48 Ton Hospel Wed Oct 9 01:43:22 2002
-p ($_)=`$^X tpr05b.pl -sn 2>&1`=~/ $_\D+(.*
)/
update cheater for corrected testprogram

finding time to golf the golf cheater?

47.49 Ton Hospel Sat Oct 5 16:14:12 2002
-p ($_)=`$^X tpr05b.pl -sn 2>&1`=~/ $_
\D+(.*
)/
(almost) generic golf cheater

I was worried for a minute!

61.46 gimbo Mon Oct 7 18:46:20 2002
-lap %t=unpack"C*",q=go`^B^ZZGa^E^P^S^p<P^L^A$^L:^TO^Q;^Db^C^I^F'
#^Gc
^G^K^D^^<
Got Error: Can't find string terminator "=" anywhere before EOF at gimbo-strtol.pl line 2. (also got your next solution which appears to have all the code in it :) )
114.30 Ton Hospel Wed Oct 9 01:30:24 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl/\xe4/-4*/e/))||/te|\xe4/././*$+['^A^S^\^I^Z^V^L^G'!~($&^o&$')].$[x/y/}$_=$^;{s/\B..\d\b/,$&/&&redo
Play a bit more with the tie-breaker
117.32 Ton Hospel Tue Oct 8 22:02:59 2002
-lp040 $^+=$^%1e3*(9x(3*y/dbl//-4*/e/))||/te|lv/././*$+['^I^B^T^F^S^W^E^N^C^A'!~($&^v&$')].$[x/y/}{$_=$^;1while+s/\B..\d\b/,$&/
Panic ! Rick gets too close
138.30 Mtv Europe Sat Oct 5 14:23:42 2002
-pl eval lc pack u,'\xb5\xb1.-\xd3\xe8\xd4\xf7\xc4\xb8\xa6Yh\xfe\xe4\xb6/O|^R^D\xcc\xb7D\xb8\xe9NL\xa2^Q,\xfaO,\xf8\x8f$\x93D\xb9\xabO\xb3c\xce>Yn<\xean\x92^^H\xea[\xee\xd3}(\x9a\xf9\xa9\xce\x9c\xe5\x96\xa9\xd2Yl0A\xb8<\xe3\x8f$\xf4^R8G\xf8?\x93\xe6\xbf"\xed\xf3r\xdb\x9d\xb1?tL\xcb^R\xe6\xf3<\xe2^_t\x83\x8e8\x92\xc4$\xf1^F0\xf9\xc3'
what BoB will answer?

finally got round to rejecting this one - more than 75% of characters are unprintable

148.23 Greg Allen Thu Oct 10 12:25:52 2002
-pla eval lc pack u,'\xb5\xb1^Z)\xd3\xfb\xa6\x8fo=\xf0H^Q\xb2\xdd^Q\xa2\x91\x952\x8a\xe4\xf8\xa9\x90\xf3\xc9h\xf9^O}^T^Ph\x81^Z-\xd3\xe6<\xb3\xce\xee\xed\xf6\xd3\x8f,\xfd\xcf,\xfe\xf4\xde\xe8\xa6\xffO)2\xd1@\xa2^O\xd2S\xcb>[^O$\xb3\xfb\x96\xefi<\xa6^KX\xa3\xf3<\xe1^_\xe0\x83D,\xfeO$\xc4I\x9a\xfc\x88\xcf^K)\xd0\x96\xc4\xfd\xd1^Z,F\xdb\xcc\xf3\x88}\xd2^N8\xe2K^P\x93\xc4^X\xc3\xe7'
code generator!! with correct char counts. change the eval to print to output the code. printf "#!perl -pla eval lc pack u,'%s' ", unpack u, uc <<'`' mm;$:*=/[ih]o/?!($;+=$:*1e3**y/bid//):/d/?100:($:+=/f/+/.[nwv mf]./+/w/+/[tf][hio]/*3+10*(/te/+/el/)+/[en]i/*8+6*/s/.$?x(-$ d+/y/),1)for(split);$_=$:+$;;s/.(?=(...)+$)/$&,/g `

and this one! (not that it's much shorter than your acceptable solution)

150.26 Greg Allen Thu Oct 10 12:19:09 2002
-pla eval lc pack u,'\xb5\xb1^Z)\xd3\xfb\xa6\x8fo=\xf0H^Q\xb2\xdd^Q\xa2\x91\x952\x8a\xe4\xf8\xa9\x90\xf3\xc9h\xf9^O}^T^Ph\x81^Z-\xd3\xe6<\xb3\xce\xee\xed\xf6\xd3\x8f,\xfd\xcf,\xfe\xf4\xde\xe8\xa6\xffO)2\xd1@\xa2^O\xd2S\xcb>[^O$\xb3\xfb\x96\xefi<\xa6^KX\xa3\xf3<\xe1^_\xe0\x83D,\xfeO$\xc4I\x9a\xfc\x88\xcf^K)\xd0\x96\xc4\xfd\xd1^Z,F\xdbo3\xce!\xf7H8\xe3\x89,BO^Pc^O\x9c\xb0'
code generator!! printf "#!perl -pla eval lc pack u,'%s' ", unpack u, uc <<'`' mm;$:*=/[ih]o/?!($;+=$:*1e3**y/bid//):/d/?100:($:+=/f/+/.[nwv mf]./+/w/+/[tf][hio]/*3+10*(/te/+/el/)+/[en]i/*8+6*/s/.$?x(-$ f+/y/),1)for(split);$_=$:+$;;;s/.(?=(...)+$)/$&,/g+ `

sorry, Greg. Last of general rules rules this out.

154.36 Rick Klement Sun Oct 6 13:51:01 2002
-lp040 @={ontwthfofisiseeiniteel=~/../g}=1..$=;!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/+/h/*99*$@:($~+=$@.$-x(3&1+ord)x3,$@=0)}{$_=$~+$@;s/\B(?=(...)+$)/,/g
WARNING: this solution passes the v2 test suite, but fails for "three hundred three" => "303". Also, the test program input does not match the given regex, *no* "\n" is provided. Also, the rules page statement of the tiebreak is backwards, the tiebreak favours programs with *fewer* alphanumerics and spaces.
167.50 Juho Snellman Sat Oct 5 22:22:25 2002
-pli9 for$a(b,X,X,m=>X,X,tho,hu,ty){s/(.*?)$a\S*/+($1)*1E$^I
/g;$^I--}s/een|lve/+10/g;s%(\pL.)\w+%+(index"zeontwthfofisiseeiniteel",$1)/2%g;$_=eval;s/.(?=(...)+$)/$&,/
178.49 Jeff Moore Sun Oct 6 07:01:26 2002
-pl s/ h/h/g;s/lv|te/ ck/;for$t(qw/b m tho ,/){s/(.*?)$t//;$s=1000;$s+=(/../,1+index"Dontwthfofisiseeinickel",$&)/2*(/d/*99+/y/*9+1)for$1=~/\w+/g;$s=~s/1/,/;$_.=$s}s/[0,]*(?!$)//
184.64 Alexey Rudenko Wed Oct 9 11:53:19 2002
#!perl -lp $q="$2+$3",s/((.*?)$1\w*|(.*000))/$+$q/g while'hu*100tee10ty*10lv10z0one1tw2thi3thr3fo4fi5si6se7ei8ni9te10el11bi,1000mi,1000tho,1000'=~/(\D+?)(\W?)(\d+)/g;$_=join',',eval;s/,1/,/g
Don't put your program on the #!-line! It costs you one stroke, even if I would accept this.
214.52 tanma Sun Oct 6 12:41:42 2002
-pl s/el/o+10/;s/y/*10/g;s/te/+10/g;for$l(split$",")*1:3tho
 )*1:6m
 )*1:9b
 +0z +1o +2tw +3t +4fo +5f +6si +7s +8e +9n *100h"){$l=~/[a-z]+/;s/\b$&/$l/g}y/:a-z/e/d;s/.*\)/+($&/g;$_=eval;pos=y///c%3||3;s/\G.../,$&/g
'twelve thousand twelve' => 12,002
231.41 gimbo Mon Oct 7 19:20:46 2002
-lap %t=unpack"C*",q=gob^C^I^F'
#^G`^B^ZZ^G^Kc
Ga^E^P^D^^^H^I^S^p<+^S^B2^\^E^]d6(PK[jF^L^A$^LI^R-^H:^TO^Q;^D=;map{$c=$c*26-97+ord for/./g;($n=$t{$c%118})<91?($s+=$n):($n-=91)?($t+=$s.0 x$n,$s=0):($s*=100);$c=0}@F;$_=1e12+$t+$s;s/^1|.../,$&/g;s/^,1[0,]+(?=.)//
Found golfer: (gimbo) Hole 'strtol' /home/geoff/dev/perlgolf/judging/gimbo.pl: Running test 1 ... Ok /home/geoff/dev/perlgolf/judging/gimbo.pl: Running test 2 ... Unexpected STDOUT: Expected: 1 but got: 73 (You may need to resubmit as
244.56 Amir Karger Mon Oct 7 16:00:54 2002
-lp @i=(" h",qw((\\w+)te ty one two|twen th[ir] fo f si se ei ni te ele tw 00),
"1ty ",0..12);
for$c(0..14){s/$i[$c]\pl*/$i[$c+15]$1/g}
$r=$_;
$_=join",",map{ 
sprintf"%03d",$r=~s/.*$_\w* ?//i&&eval join"+",$&=~/\d+/g
}b,M,t,"";
s/^[0,]*(.)/$1/
I know I'm going to regret entering this contest. My eyeballs hurt already!

'Can't find unicode character property definition via main->l or l.pl at unicode/Is/l.pl line 0' - some sort of unescaped character problem in a regex, we think, Amir.

251.49 Michael Thelen Sun Oct 6 09:33:24 2002
-lp sub f{.5*index'zeontwthfofisiseeiniteel',pop}s/wel/12/g;s/b/,/;s/m/,/||s/,/,,/;s/tho/,/||s/,/,,/;s/ty( ,|$)/0$1/g;s/ h/H/g;s/(\S\S)\S+een/10+f$1/eg;s/(?<![,-z])[a-z]{2}/f$&/eg;y/a-z //d;s/H(\d)?\b/'0'.1*$1/eg;s/H//g;s/(?<=,)\d*/sprintf"%03d",$&/eg
Okay, I'm not in last place anymore. Now I can go to bed.
277.48 Matt Diephouse Mon Oct 7 23:40:07 2002
-l %s=qw(d 100 y 10 t 3 m 6 b 9);%c=map{$_,2+$s++}qw(tw th fo fi si se ei ni);$n=pop."  ";while($n=~s/(.+?(m|t|b)\S+(n|d)|.+)\s//){my$a;$_=$1;while(s/((\S\S)(.+?(y|d|n)|\S+))\s//){$a+=($s{$4}||1)*($1=~/z/?0:$c{$2}||1)}$f+=10**$s{$2}*$a}print(join',',grep/./,split/(\d{3})/,$f);
Are you testing with 5.6.1? Running test 1 ... Warning: Use of "pop" without parens is ambiguous at strtol.6082 line 2.
279.48 Matt Diephouse Mon Oct 7 23:55:21 2002
-l %s=qw(d 100 y 10 t 3 m 6 b 9);%c=map{$_,2+$s++}qw(tw th fo fi si se ei ni);$n=pop()."  ";while($n=~s/(.+?(m|t|b)\S+(n|d)|.+)\s//){my$a;$_=$1;while(s/((\S\S)(.+?(y|d|n)|\S+))\s//){$a+=($s{$4}||1)*($1=~/z/?0:$c{$2}||1)}$f+=10**$s{$2}*$a}print(join',',grep/./,split/(\d{3})/,$f);
Running test 2 ...Unexpected STDOUT: Expected: 1 but got: 0
284.45 Michael Thelen Sun Oct 6 08:41:36 2002
-lp %t=(on,1,tw,2,th,3,fo,4,fi,5,si,6,se,7,ei,8,ni,9);s/zero/0/;s/twel/12/g;s/el/11/g;s/ten/10/g;s/b/,/;s/m/,/||s/,/,,/;s/tho/,/||s/,/,,/;s/ty( ,|$)/0$1/g;s/ h/H/g;s/(\S\S)\S+een/1$t{$1}/g;s/\b[a-z]{2}/$t{$&}/g;y/a-z //d;s/H(\d)?\b/'0'.(0|$1)/eg;s/H//g;s/(?<=,)\d*/sprintf"%03d",$&/eg
58 strokes improvement, that's not too bad.

"one billion one million one" gives 1,000,001,001. I will update the test script.

299.64 Philippe Bricout Thu Oct 10 15:46:45 2002
-l $_="one hundred sixty two million three thousand two hundred ninety nine";
s!(.*?)(b|mi|tho)\w+!"+($1)*10**".(4-length$2)*3!eg;

print;

s/ h\w+/00/g;

print;

y/y/0/;

print;

s#[a-z]+#$_=$&,'+'./te|lv/.(1+index-ontwthfofisiseeini__el,'\x7f\x7f'&$_)/2#eg;

print;

$_=eval;

print;

s/.(?=(...)+$)/$&,/g;

print;
328.52 Johannes Singler Thu Oct 10 10:31:48 2002
@a=qw/o tw(o|en) th(i|r) fo fi si se ei n te el twel/;
for(split/ /,<>){
^I$i=1;
^Iforeach $d(@a){
^I^Iif(/^$d/){$x+=$i;}

^I^I$i++;
^I}
^Iif(/tee/){$x+=10;}
^Iif(/ty/){$x*=10;}
^Iif(/^h/){$y=$x*1e2;$x=0;}
^Iif(/^tho/){$n+=($x+$y)*1e3;$x=0;$y=0;}
^Iif(/^m/){$n+=($x+$y)*1e6;$x=0;$y=0;}
^Iif(/^b/){$n+=($x+$y)*1e9;$x=0;$y=0;}
}
print $n+$x+$y;
My first Perl Golf code.

output isn't what's required. There are no newlines at the end, and the numbers aren't commafied when necessary (3000 should be 3,000). Apart from those things, it's excellent for a first ever golf.

342.46 Michael Thelen Sun Oct 6 07:59:07 2002
-ln %t=(on,1,tw,2,th,3,fo,4,fi,5,si,6,se,7,ei,8,ni,9);s/zero/0/;s/twel\S+/12/g;s/el\S+/11/g;s/ten/10/g;s/b\S+/,/;s/m\S+/,/||s/,/,,/;s/tho\S+/,/||s/,/,,/;s/ty/ T/g;s/ h\S+/ H/g;s/(\w\w)\S+een\b/1$t{$1}/g;s/(\w\w)\S+\sh\S+/$t{$1}/g;s/(\w\w)\S+/$t{$1}/g;s/ //g;s/T\b/0/g;s/H\b/00/g;s/H(\d)\b/0$1/g;s/[TH]//g;s/(?<=,)\d*/sprintf"%03d",$&/eg;print
Here for your enjoyment is a terribly long solution, my very first program that passes all tests (but that doesn't necessarily mean it's correct).
393.65 Chris Dolan Sat Oct 5 07:00:24 2002
-lp s/(\w+)teen/1$1/g;s/(\w+)ty/${1}0/g;%r=split/(\d+)/,"zero00one1two2three3four4five5six6seven7eight8nine9ten10eleven11twelve12thir3fif5eigh8twen2for4";s/[a-z]+/$
r{$&}||$&/ge;s/([^      ]*) billion/($1)*1e9    /g;s/([^        ]*) million/($1)*1e6    /g;s/([^        ]*) thousand/($1)*1e3   /g;s/([^        ]*)hundred/($1)*1e2    /g;s/\s+([^)])/+$1/g;$_=0+eval;1while s/(\d)(\d\d\d)\b/$1,$2/
First working solution (hope I pasted it right...)
477.66 Matthias Schoder Wed Oct 9 12:02:30 2002
-ln %n=(billion,1E9,eight,8,eighteen,18,eighty,80,eleven,11,fifteen,15,fifty,50,five,5,forty,40,four,4,fourteen,14,hundred,100,million,1E6,nine,9,nineteen,19,ninety,90,one,1,seven,7,seventeen,17,seventy,70,six,6,sixteen,16,sixty,60,ten,10,thirteen,13,thirty,30,thousand,1E3,three,3,twelve,12,twenty,20,two,2);$r=$n=0;while(/(\w+)/g){$t=$1;if($t=~/^(m|b|tho)/){$r+=$n*$n{$t};$n=0}elsif($t=~/^h/){$n*=100}else{$n+=$n{$t}}}$r+=$n;$_="$r ";1while s/(\d)(\d\d\d)/$1 ,$2/;s/ //;print
300 Characters for the number strings. ;-)

I get "3,000 " (with a trailing space) instead of "3,000", and "6,0 ,0 ,0 ,000" instead of "6,000,000".