Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Perl Golf Ethics

by eyepopslikeamosquito (Bishop)
on Jan 03, 2007 at 03:26 UTC ( #592689=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl -pl
    map{$_.=(!y/IVXLC/XLCDM/,I,II,III,IV,V,VI,VII,VIII,IX)[$&]while s/\d//
    +;$$_=$n++}@R=0..3999;
    y/mp/-+/;s/\w+/${$&}/g;$_=$R[eval]
    
  2. or download this
    #!perl -pl
    map{y/IVXLC/XLCDM//s//$&-9?$&-4?I x$&:IV:IX/e&s/I{5}/V/while/\d/;$$_=$
    +n++}@R=0..3999;
    y/m/-/;s/\w+/+${$&}/g;$_=$R[eval]
    
  3. or download this
    #!perl -pla
    %n=I1V5X10L50C100D500M1000=~/(.)(\d+)/g;sub
    d{$#_-=$z*2*(@_&&$z<$_)-($z=$_)for@n{/./g};@_}$t+=($.=/p/-/n/||$.)*d
    for@F;map{$s.=$_ x($t/d),$t%=d}M,CM,D,CD,C,XC,L,XL,X,IX,V,IV,I;$_=$s
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://592689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-08-17 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?