This might just be a matter of taste, but I wouldn't die if the string wasn't 9 digits long; instead, I'd return false, as it clearly is an invalid number. I'm a bit wary of having subroutines cause my program to die. Then again, I don't know the context of the sub in your program. :-)
Also, if you're going to check the input for validity, you might also test that the string contains all digits; /^\d{9}$/ would take care of both conditions. Just some things to think about.
His Royal Cheeziness
In reply to Re: Elfproef (Dutch bank account check)
by CheeseLord
in thread Elfproef (Dutch bank account check)
by Treenaks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |