in reply to Can If-then conditions do ($a = $b = $c) type expressions?
How about:
if (not grep {$a!=$_} ($b, $c)) { ... }
Note that if you want a string comparison, replace != with ne.
In Section
Seekers of Perl Wisdom
in reply to Can If-then conditions do ($a = $b = $c) type expressions?
How about:
if (not grep {$a!=$_} ($b, $c)) { ... }
Note that if you want a string comparison, replace != with ne.