if i understand correctly, you might do something like: ($x1,$y1) = cat($x,$y)->dice_axis(0,vsearch($x, $xs ))->dog()
... which is only 1 statement, but it's certainly not any prettier (or any more efficient) than your solution using a temporary $index. marmosets, Bryan On Thu, Dec 4, 2014 at 11:34 PM, Chris Marshall <devel.chm...@gmail.com> wrote: > Do you have a working example of what you want? > What you've described seems to want to index piddles > $x and $y by indx values from vsearch-ing $xs which > is not related to the shape of $x or $y. > > --Chris > > > On Thu, Dec 4, 2014 at 3:51 PM, Diab Jerius <djer...@cfa.harvard.edu> > wrote: > >> In today's attempt to write inscrutable one-liners, I'm trying >> to turn the following code >> >> $index = vsearch( $x, $xs ); >> @piddles = map { $_->index($idx) } $x, $y; >> >> Into something like this: >> >> @piddles = whindex( $x, $y, vsearch( $x, $xs ) ); >> >> e.g., where(), but with indices instead of a mask. >> >> Does such a function exist? >> >> Thanks! >> Diab >> >> _______________________________________________ >> Perldl mailing list >> Perldl@jach.hawaii.edu >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > > > _______________________________________________ > Perldl mailing list > Perldl@jach.hawaii.edu > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > > -- Bryan Jurish "There is *always* one more bug." moocow.bov...@gmail.com -Lubarsky's Law of Cybernetic Entomology
_______________________________________________ Perldl mailing list Perldl@jach.hawaii.edu http://mailman.jach.hawaii.edu/mailman/listinfo/perldl