|
|
|
use Test::Input; print "A number" if(IsNumber($N)); print "In Range" if(InRange($N, 1, 10)); print "Is a URL" if(IsURL($URL)); print "Mailaddr" if(isEmail($Address)); # Console tool my ($PASS1, $PASS2) = GetInput { return "Password don't match!" if($_[0] ne $_[1]); return "Password length needs to be at lease 8 characters!" if(length($_[0]) < 8); } 'Choose Password' => undef, 'Re-enter Password' => undef; print "Password is $PASS1, retyped as $PASS2";
Alfred Neuman <Neuman@BBN-TENEXA> ":sysmail" @ Some-Group . Some-Org Nuhammed.(I am the Greatest) Ali @(the)Vegas.WBA
That's not an error of the author, he never intended that that regexp would be used to validate e-mail addresses at the internet. It's just an experiment if such a regular expression could be written.
Properly, you don't want to accept any of those e-mail addresses in your input. This routine allows all commonly used characters, a domain name followed by an extension of 2,3 or 4 characters. It also accepts an IP address instead of domain names.