my $dna_input = $ARGV[0]; # turn command line input into a variable my @dna = split("", $dna_input); #split the variable into an array so as to check each nucleotide my $count = 0; # keep track of position so as to report where there is a non-nuceloetide character my $base; foreach $base (@dna) { if($base eq 'A' || 'T' || 'C' || 'G') { $count += 1; } else { print "Non-nucleotide at $count position\n"; } }