in reply to Using regular expressions with arrays
use strict; use warnings; my @GI = ( "gi|Q384722390|emb|WP_938420210.1|Gene name", "gi|342546780|emb|WP_934203412.1|Gene name" ); my @Accession = qw( WP_938420210.1 WP_934203412.1 ); my $i = 0; for my $A(@Accession) { for my $G(@GI) { if ( $A =~ $G ) { print "$G\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using regular expressions with arrays
by AnomalousMonk (Archbishop) on Apr 13, 2015 at 18:32 UTC |