Not really, you are filtering the sample input, hdb is filtering any input by a "repeating pattern".
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
In reply to Re^3: Grep Pattern
by LanX
in thread Grep Pattern
by GotToBTru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |