Convert::Number::Armenian - convert between Armenian and Western numerals
use Convert::Number::Armenian qw( arm2int int2arm ); my $armenian_rep = int2arm( 1999 ); my $decimal_val = arm2int( 'ՌՋՂԹ' );
This is a relatively simple module for converting between Armenian-style numbers and their Western decimal representations. The module exports two functions on request:
Takes a string that contains an Armenian number and returns the decimal value. The function tries to deal with common though non-canonical representations such as ՃՌ for 100,000. The Armenian string may be upper- or lowercase, or a mix of both.
Takes a number and returns its Armenian representation in canonical form, meaning an uppercase string with digit values descending from left to right. At the moment only values between 1 and 29999 can be converted.
The module as written depends on correct Perl Unicode behavior; that means that on earlier versions of Perl this module may not work as expected. As soon as I work out which is the minimum version, I will update the module with the correct requirement.
Armenian ligatures probably won't produce the correct result for arm2int.
This package is free software and is provided "as is" without express or implied warranty. You can redistribute it and/or modify it under the same terms as Perl itself.
Tara L Andrews, firstname.lastname@example.org