in reply to Sparing multiple 'or's
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sparing multiple 'or's
by BillKSmith (Monsignor) on Jun 04, 2018 at 16:15 UTC | |
by AnomalousMonk (Archbishop) on Jun 04, 2018 at 20:26 UTC | |
by LanX (Saint) on Jun 04, 2018 at 20:46 UTC | |
by LanX (Saint) on Jun 04, 2018 at 21:34 UTC | |
by LanX (Saint) on Jun 04, 2018 at 18:54 UTC |