Bio-ToolBox

 view release on metacpan or  search on metacpan

lib/Bio/ToolBox/utility.pm  view on Meta::CPAN

		else {
			# convert the romanic to numeric
			while (@romanic) {
				my $r = shift @romanic;
				my $c = $r->[0];
				$c =~ s/IV/4/;
				$c =~ s/IX/9/;
				$c =~ s/V/5/;
				$c =~ s/I/1/g;
				my $n = 0;
				foreach ( split m//, $c ) {
					if ( $_ eq 'X' ) {
						$n += 10;
					}
					else {
						$n += $_;
					}
				}
				push @numeric, [ $n, $r->[1] ];
			}
		}



( run in 1.007 second using v1.01-cache-2.11-cpan-483215c6ad5 )