Note that there are some explanatory texts on larger screens.

plurals
  1. POPerl Comparing two arrays if they match exactly
    primarykey
    data
    text
    <p>I have a file stored in a hash with a value being an array. I would like to compare the arrays with each other and if they match exactly then store them in an array. </p> <p>For example:</p> <blockquote> <p>@geno1 = NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,T,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,G,NN,NN,NN,NN,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN</p> <p>@geno2 = NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,T,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,G,NN,NN,NN,NN,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN</p> </blockquote> <p>In this this matches exactly, Then I would like to store them in an array. If they are different even by one element. Say,</p> <blockquote> <p>@geno2 = NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,NN,A,NN,NN,NN,NN,NN,NN,T,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,G,NN,NN,NN,NN,G,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,NN,A</p> </blockquote> <p>In this the last element is A. So that shouldn't be stored in the array. If there is a way to do this without lopping through the array would be great. Since I have to run this on 10k samples and more frequently. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload