Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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";

Deepak

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..

    Deepak