if ( ( split /\@/, $mail, 2 )[1] eq $domain ) { # tu was du willst }