Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Perl Golf Ethics

by eyepopslikeamosquito (Archbishop)
on Jan 03, 2007 at 03:26 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-20 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found