in reply to boolean IN(); function in perl like

There certainly is. It's called grep. Sample code:
my $count = grep { $_ eq $e } @a;
Then $count will contain the number of occurrences of $e within @a.