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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Grep Pattern
by hdb (Monsignor) on Dec 13, 2018 at 08:29 UTC | |
Re^4: Grep Pattern
by ikegami (Patriarch) on Dec 13, 2018 at 18:25 UTC | |
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 | |
|
In Section
Seekers of Perl Wisdom