Just MHO...grep { grep { $scalar == $_ } @{$_} } @array
Update:And it's faster, 1000000 iterations has Grep+Grep at 11 Walclocks and Grep+Map at 16.
-- Casey
In reply to RE: RE: Comparing Scalars and Arrays
by cwest
in thread Comparing Scalars and Arrays
by zdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |