2008/8/15 Li, Aiguo (NIH/NCI) [E] <[EMAIL PROTECTED]>:
> Hello,

Hello

> I have a programming questions to you all,
>
> I have three arrays: arrayA1, arrayA2, (arrayA1 and arrayA2 are same
>
> length) and array B.  Using the following code I created the fourth
>
> arrayC that contain intersection elements between arrayA1 and arrayB.
>
> Now I need to get the corresponding elements in arrayA2 into arrayD.
>
> Can anyone help me with this issue?
>
> map { $original {$_} = 1 } @arrayA1;

> @arrayC = grep {$original {$_} } @arrayB;
>
>
> The bottom line question is how to track the element location of $_ in
>
> arrayA1 when generating the intersected elements in arrayB, then use
> this index to get
>
> the corresponding elements in arrayA2.
>
>
>
> Thanks in advance for your help and have a good night!
>
>  AG Lee

Ouch. It's late here (and I've had a glass of wine) but this looks
like it would be resolved by a bit of sorting with indices.
Unfortunately I am struggling to see what you want given the
information offered. Could I refer you to page 79 of the Alpaca book?
Hopefully some will have something more to offer.
Good luck.
Dp.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to