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


in reply to Grep Pattern

slightly cheating ;-)

DB<33> x @a=(0,1,1); grep { (each @a)[1] } A..L 0 'B' 1 'C' 2 'F' 3 'G' 4 'J' 5 'K'

here the general case w/o cheating:

(like when the filter cycle ends with a 1 you'd need)

DB<34> x @a=(0,0,1,1); grep { (each @a)[1] // (each @a)[1] } A..L 0 'C' 1 'D' 2 'G' 3 'H' 4 'K' 5 'L'

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