Update: In your case, regular expression would be the easiest solution:
my $dna = shift; # Get the first command line argument. if ($dna =~ /[^ACTG]/g) { die "Non-nucleotide at " . pos($dna); }
In reply to Re: If/else within a foreach loop to check strings within an array
by choroba
in thread If/else within a foreach loop to check strings within an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |