use List::MoreUtils qw(indexes); my @a = ( 6, 7, 8 ); my @b = ( 3, 2, 1 ); @a = @a[ indexes{ $_ > 1 } @b ];
Update: Others beat me to this one by hours. ;)
Dave
In reply to Re: Boolean array indexing
by davido
in thread Boolean array indexing
by johnmillerflorida
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |