in reply to Re^3: Grep Pattern
in thread Grep Pattern
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], ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Grep Pattern
by LanX (Saint) on Dec 14, 2018 at 12:29 UTC | |
by ikegami (Patriarch) on Dec 14, 2018 at 17:06 UTC | |
by LanX (Saint) on Dec 14, 2018 at 17:25 UTC | |
by ikegami (Patriarch) on Dec 14, 2018 at 22:46 UTC | |
by LanX (Saint) on Dec 15, 2018 at 01:30 UTC | |
|
In Section
Seekers of Perl Wisdom