PerlSufi has asked for the wisdom of the Perl Monks concerning the following question:
Any insight into how I can get the full name mapped out properly would be greatly appreciateduse strict; use warnings; use Data::Dumper; use Locale::SubCountry; my $country = new Locale::SubCountry('United States'); my @states = $country->all_codes; my @list; my %state_hash = $country->code_full_name_hash; our $subcountry = do { @list = map { { code => uc($_), name => $country->full_name }} + @states; }; print Dumper(\@list);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mapping results of a Function
by perlfan (Parson) on Jun 17, 2014 at 15:07 UTC | |
by PerlSufi (Friar) on Jun 17, 2014 at 16:32 UTC |