Hi,
I have a form in which I don't allow certain number variations to be inputed...so, basically if either of the two numbers below are entered, it will produce an error. It works fine right now the way I'm doing it below, but now, I need to add like 35-40 different number variations, and this probably isn't the best way to do it.
if (($FORM{'name'} eq "1234") or ($FORM{'name'} eq "5432")) {
Anyone know of better way to do this?
I tried this:
my @Number = (
'1234',
'5432',
);
Then within the sub:
if ($FORM{'Name'} eq '@Number')
{
But it doesn't work, and I'm probably missing something...any ideas or suggestions would be great. Thanks.
I have a form in which I don't allow certain number variations to be inputed...so, basically if either of the two numbers below are entered, it will produce an error. It works fine right now the way I'm doing it below, but now, I need to add like 35-40 different number variations, and this probably isn't the best way to do it.
if (($FORM{'name'} eq "1234") or ($FORM{'name'} eq "5432")) {
Anyone know of better way to do this?
I tried this:
my @Number = (
'1234',
'5432',
);
Then within the sub:
if ($FORM{'Name'} eq '@Number')
{
But it doesn't work, and I'm probably missing something...any ideas or suggestions would be great. Thanks.