If this is something you need to do only once, then you're best off with something like this:
my $elem_count=grep /^$scalar$/,@array;
In reply to Re: Comparing Scalars and Arrays
by lhoward
in thread Comparing Scalars and Arrays
by zdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |