Help for this page

Select Code to Download


  1. or download this
    sub roman-to-dec($x) {
        state %rtoa = M=>1000, D=>500, C=>100, L=>50, X=>10, V=>5, I=>1;
    ...
    for @testdata -> $r {
        say "$r: ", roman-to-dec($r);
    }