
bernoulli
New User
Jun 2, 2008, 1:13 AM
Post #1 of 2
(1273 views)
|
|
Using OR matching
|
Can't Post
|
|
Hi all, I need to do something like:
if ($code eq 'us' || $code eq 'au' || $code eq 'jp') Would it be exactly the same if I do this?
if ($code =~ '^(us|au|jp)$') What would be a better way to write this sort of code (without using a hash) if I have 10 codes to match? Regards,
|