W
Winston
..
..
while ($name =~ /[^A-Z]{3,9}/) {
print "Invalid, try again: ";
chop($name = uc <STDIN>);
}
Of course that is wrong.
The user must try again if this is true: $name =~ /[^A-Z]/
and this is false: $name =~ /.*{3,9}/
..
while ($name =~ /[^A-Z]{3,9}/) {
print "Invalid, try again: ";
chop($name = uc <STDIN>);
}
Of course that is wrong.
The user must try again if this is true: $name =~ /[^A-Z]/
and this is false: $name =~ /.*{3,9}/