in reply to Using regular expressions with arrays
Note I've used the Foreach Loops construct instead of using an explicit index because you do not actually care for your output what the index was.for my $Accession (@Accession) { for my $GI (@GI) { if ($Accession =~ $GI) { print "$GI\n"; last; } } }
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using regular expressions with arrays
by AnomalousMonk (Archbishop) on Apr 13, 2015 at 18:47 UTC |