Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Elfproef (Dutch bank account check)

by CheeseLord (Deacon)
on Jul 28, 2001 at 22:40 UTC ( [id://100578]=note: print w/replies, xml ) Need Help??


in reply to Elfproef (Dutch bank account check)

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100578]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found