I stand by what I said. Even just hardcoding the 4 warranted horror. And you are mistaken about the restrictiveness of my code.
or@a[ grep { $pat[ $_ % @$pat ] } 0..$#a ]
sub filter_by_pat { my $pat = shift; return @_[ grep { $pat->[ $_ % @$pat ] } 0..$#_ ]; } filter_by_pat [0,1,1,0], ...
In reply to Re^4: Grep Pattern
by ikegami
in thread Grep Pattern
by GotToBTru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |