My query is quite different but still am sure it can be done with Perl although i don't know how
I have an array of all the bigrams that exist in the alphabet. A bigram is a two - letter combination.
I have all the bigram combinations in an array so $bigram[0] is aa and $bigram[675] is zz.
$bigram[0] = "aa"; $bigram[1] = "ab"; ...$bigram[675] = "zz"
Now i have an array that contains a bigram for every element. From that array i want to check which bigrams from my list exist in my @bigram_list array. For those bigrams that indeed exist once or more i want to make another array the same size as my @bigram array that will have a 1 for those bigrams that exist and a 0 for the bigrams that don't exist in my @bigram_list array.
For example:
@bigrams : as said previously
@bigram_list = ("ac","ab","wd","xs");
So here, the new array that i want to hold the numbers will have 0 in every element apart from the positions where "ac", "ab", "wd" and "xs" are where there should be a 1.
Sorry, if this is complicated i tried to make it as understandable as i could. Does anyone know of a way i could do this? Thanks for looking
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |