http://www.perlmonks.org?node_id=849886


in reply to Re: Code Golf: Four is magic
in thread Code Golf: Four is magic

So, um, what's @u still doing in there? :)

Update: Removing @u, using do{} instead of a sub, and applying the "say" cheat gives 261 260 (until/m/) strokes

#123456789 123456789 123456789 123456789 123456789 123456789 12345 +6789 123456789 123456789 123456789_123456789 123456789 123456789 1234 +56789 123456789 123456789 123456789 123456789 123456789 123456789_123 +456789 123456789 123456789 123456789 123456789 123456789 for f in 0 4 12 99; do perl -E'$_=pop;say$z=do{@p=(Thir,Four,Fif,Six,Seven,Eigh,Nine);@n=("", +One,Two,Three,Four,Five,@p[3..6],Ten,Eleven,Twelve,map($_.teen,@p),ma +p$_.ty,Twen,@p);$n[22]=~s/u//;$n[8].=t;$_?$_<20?$n[$_]:$n[$_/10+18].$ +n[$_%10]:Zero}," is ",$_=$_-4?length$z:magic,"."until/m/' $f ; \ echo; done

Good Day,
    Dean

Replies are listed 'Best First'.
Re^3: Code Golf: Four is magic
by thundergnat (Deacon) on Jul 16, 2010 at 00:32 UTC

    Ummm........ Wasting about 30 strokes? Apparently I have very selective blindness...