grep { $a eq $_ } 'ABA', 'SCO', 'ACC', 'PHC' , 'GHF'
gives you the number of successful tests.
I.e. it's true in boolean context as long as it matches at least once.
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Sparing multiple 'or's
by LanX
in thread Sparing multiple 'or's
by Denis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |