in reply to Help tracking changes in array

Doesn't BioPerl already do this stuff? Regardless, you should die if the user doesn't give you what you want. Then, you can split each seq into characters and loop over them:
use warnings; use strict; die "provide two sequences \n" unless @ARGV == 2; die "ensure the sequences are the same length \n" unless length($ARGV[ +0]) == length($ARGV[1]); my @s1 = split //, $ARGV[0]; my @s2 = split //, $ARGV[1]; my $cnt = 0; for my $i (0 .. $#s1) { if ($s1[$i] ne $s2[$i]) { printf "pos %d: %s => %s\n", $i+1, $s1[$i], $s2[$i]; $cnt++; } } print "snps = $cnt\n";