I am not able to do looping with two arrays simultaneously
I need to match the each elements from the below array
This should be done without using any modules
Eg: Array 1: A T C G T C G A G C G
Array 2: A C G T C C T G T C G
my ($array1ref, $array2ref) = @_; my @array1 = @$array1ref; my @array2= @$array2ref; my $count = 0; foreach my $element (@array1) { foreach my $element2 (@array2) { if ($element eq $element2) { $count++; }else { ??????????? }
Thank you
In reply to Array looping by Nansh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |