my %oddball = ( '' => '', gbr => '', ); my $country = $card->country; $country = exists $oddball{$country} ? $oddball{$country} : "[\U$country\E]";