Bryan, That's functionally equivalent to what I want. I have to admit that I agree with your sentiments about the code complexity.
On Fri, Dec 5, 2014 at 3:56 AM, Bryan Jurish <[email protected]> wrote: > 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 <[email protected]> > 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 <[email protected]> >> 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 >>> [email protected] >>> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> >> >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > > > > -- > Bryan Jurish "There is *always* one more bug." > [email protected] -Lubarsky's Law of Cybernetic Entomology _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
