Let\'s say I have an array, and I know I\'m going to be doing a lot of \"Does the array contain X?\" checks. The efficient way to do this is to turn that array into a hash, wher
You could also use Perl6::Junction.
use Perl6::Junction qw'any'; my @arr = ( 1, 2, 3 ); if( any(@arr) == 1 ){ ... }