sub RtoD { # ... or uc(shift) to be paranoid. :-) my $n = shift || return 0; if ( $n =~ /([IVXCLMD])/ ) { return $numeral{$1} } else { return 0 } }