Hi All,
I was just writing an if statement that looked something like:- if ($var eq "a" || $var eq "b" || ... and so on
I'm sure there is a much shorter way to do it. I know I could use grep or a regexp, but I'm thinking there is a more efficient way to do it... Help much appreciated :)
Lyle
Update: I was just looking through my previous posts and realized I'd posed an almost identical question 3 years ago! To which there were many solutions posted: 516797 I like the 'any' solution best.