I have my code like this:
if ( $var eq \"str1\" || $var eq \"str2\" || $var eq \"str3\" ) { ... }
Is there anyways to optimize this. I want
I'm semi-joking, but this will do it:
use Quantum::Superpositions; if ($x == any($a, $b, $c)) { ... }
See also this Perl Monks thread