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


in reply to Re: Golf: Magic Formula for Roman Numerals
in thread Golf: Magic Formula for Roman Numerals

Update: a new one that's only one character too long
sub b1{M1E3D500C100L50X10V5I1=~$_;$'}
Not any more. ;-)
sub b2{M999D499C99L49X9V4I=~$_+$'}

Update: As described in The 10**21 Problem (Part I) this one is four strokes shorter:

sub b3{XCMVLD=~$_;"1E@+"%9995}

Replies are listed 'Best First'.
Re^3: Golf: Magic Formula for Roman Numerals
by ambrus (Abbot) on Feb 18, 2007 at 12:56 UTC

    Oh yes, using the return value of matches is a trick that could have helped me in the Fonalty golf as well, as I've realized when reading other's solutions.