sub f { %h = qw(I 1 V 5 X 10 L 50 C 100 D 500 M 1000); eval pop =~ s#(.)(?=(.?))#"+".($h{$1}+1 <=> $h{$2})*$h{$1}#ger }