Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Locale Country not working

by mendeepak (Scribe)
on Aug 22, 2014 at 10:08 UTC ( [id://1098299]=perlquestion: print w/replies, xml ) Need Help??

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

Locale::Country is not retriving country code for Netherlands Antilles

#!/usr/bin/perl use strict; use Locale::Country; my $country = code2country('an', 'alpha-2'); my $code = country2code('Netherlands Antilles', 'alpha-2'); print "$country\n"; print "$code\n";


Replies are listed 'Best First'.
Re: Locale Country not working
by hippo (Bishop) on Aug 22, 2014 at 10:42 UTC

      That is correct. The code was retired a number of versions ago.

      If you really need to use codes that have been retired, the following will work (and is documented in the Locale::Codes::API document):

         code2country('an', 'alpha-2', 'retired');
         => 'Netherlands Antilles'
Re: Locale Country not working
by mendeepak (Scribe) on Aug 25, 2014 at 03:25 UTC

    Locale::Country had some issue in my system, re-installed and got it working. Thanks Guys..


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1098299]
Approved by marto
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-14 15:14 GMT
Find Nodes?
    Voting Booth?

    No recent polls found