http://qs321.pair.com?node_id=1227155


in reply to Re^2: Grep Pattern
in thread Grep Pattern

> But you kinda messed up on the implementation.

Not really, you are filtering the sample input, hdb is filtering any input by a "repeating pattern".

update
DB<10> @pat = ( 0, 1, 1, 0 ); DB<11> x $i=0;grep { $pat[ $i++ % 4 ] } a..l; 0 'b' 1 'c' 2 'f' 3 'g' 4 'j' 5 'k' DB<12>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice