in reply to Re: Grep Pattern
in thread Grep Pattern
That's the approach I would recommend as well. But you kinda messed up on the implementation.
my @pat = ( 0, 1, 1, 0 ); my @result = grep { $pat[ $_ % @pat ] } 0..12;
In Section
Seekers of Perl Wisdom