use Quantum::Superpositions; my $foobar = 'D'; my @array = 'A' .. 'D'; if ($foobar eq any( @array ) ) { print "Yay!\n"; } else { print "Boo\n"; }