in reply to Re: boolean IN(); function in perl like
in thread boolean IN(); function in perl like

my %lookup = map { $_ => 1 } @a;

There is no need to put values in the hash.

my %lookup; @lookup{@a}=();

Futhermode if @a is holding a set of data that is not conceptually ordered it is better to simply use a hash and not an array in the first place.