soubalaji has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perl Monks,
I have to convert Numbers to Roman, That is
5 --> V
9 --> IX
There is any perl module or algorthem is available, Please advice.
Regards,
Balaji

Replies are listed 'Best First'.
Re: Number to Roman
by jbt (Chaplain) on Aug 14, 2009 at 12:54 UTC
Re: Number to Roman
by marto (Cardinal) on Aug 14, 2009 at 12:57 UTC
Re: Number to Roman
by JavaFan (Canon) on Aug 14, 2009 at 14:00 UTC
    Lucky for you, there's no unique way to write Roman numerals. For instance, a valid way of writing Roman numerals is:
    sub decimal_to_roman { my $number = shift; # Assume valid number. return "I" x $number; }
    A bit boring, but this method can deal with numbers exceeding 4999!