The stupid question is the question not asked | |
PerlMonks |
Re: IF and some conditionsby jhourcle (Prior) |
on Jun 02, 2005 at 11:54 UTC ( [id://462865]=note: print w/replies, xml ) | Need Help?? |
I think you were on the right track with why the last one wasn't good. Try with any of the following input, and you'll see why: 50, 72, 39, 256. You want to anchor your regexes when testing for equality: print "OK\n" if ($test =~ /^[753]$/);Update: I can't spell.
In Section
Seekers of Perl Wisdom
|
|