This is part of a school project. I cannot figure out what's the problem in my regexes. I have more that work but these are giving me a hard time. Apache doesn't tell you exactly where you went wrong.
First and Last name must be two simple names and output in Lastname, Firstname format
my $name = param('name');
if($name =~ {2}) {
print "Name will be stored as $2, $1<br/><br/>";
} else {
print "Bad name. Enter just two names, your first and last<br/><br/>";
}
Password must be in this order of regexes. Begin with a single upper case character, 2 digits, a single space, 2-3 lower case letters, one special character (not a letter or digit).
my $password = param('password');
if ($password =~ /[A-Z]+\d{2}+\s+[a-z]{2,3}+-]\^$/) {
print "Password $password was accepted<br/><br/>";
} else {
print "Bad password, $password was not accepted<br/><br/>";
}