How would you guys figure out currency only having country code? Ideally in Perl but I think any other language solution would be easy enough to port.
Thanks
It looks like Locale::Object::Currency from CPAN contains what you need. It doesn't seem to have been updated since 2007, though.
#!/usr/bin/perl
use Locale::Object::Currency;
use Data::Dumper;
use strict;
use warnings;
my $bucks = Locale::Object::Currency->new( country_code => 'us' );
print Dumper( $bucks->symbol, $bucks->code, $bucks->name ); # etc..
#print Dumper $bucks; # don't do this in production; use the method interface;
# but it does appear to have the info you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With