my %CountryCode = { 'com','Comercial', 'uk','The United Kingdom', } # a hash of country name #### my %CountryCode = ( 'com','Comercial', 'uk','The United Kingdom' ); # a hash of country names #### if ($Country == $key){ #get the key of country name $CountryName = $CountryCode($key); #assign the key value to a variable }