|
|
|
#*****************************************************************#
# EMAIL: #
# Email-Adresse prüfen #
#*****************************************************************#
use includedatei;
$email = 'hallo@ihr.da';
$ok = includedatei->checkmail($email);
#*****************************************************************#
# Subroutinen #
#*****************************************************************#
sub checkmail()
{
my ($self, $mail) = @_;
my $ok = 0;
if (($mail !~ /(@.*@)|(\.\.)|(@\.)|(\.@)/) &&
($mail =~ m/([a-zA-Z0-9\-\.]{1,80})\@([a-zA-Z0-9\-\.]{1,80})\.(\w{2,4})/)) {
$ok = 1;
}
else {
$ok = 0;
}
return $ok;
}
|