$CountryName = $CountryCode{$CCode[-1]}; #assign the key value to a variable $CountryName = 'Unknown' unless $CountryName;