if ($country =~ /^\s*usa/) { $receiver ="global\@..."; } elsif ($country =~ /^\s*uk/ ) { $receiver = "europe\@..."; }