in reply to
boolean IN(); function in perl like
There certainly is. It's called
grep
. Sample code:
my $count = grep { $_ eq $e } @a;
[download]
Then $count will contain the number of occurrences of $e within @a.
Comment on
Re: boolean IN(); function in perl like
Download
Code
In Section
Seekers of Perl Wisdom