in reply to Compare two variables
Prints:my $orig = <DATA>; my $i = 0; while (<DATA>) { my $matches = $orig ^ $_; printf "Sequence %d has %d identities\n", $i++, $matches =~ tr/\0/ +/; } __DATA__ ATCGGGACG TCGTCAGCG ATGCGAAAA
Sequence 0 has 2 identities Sequence 1 has 4 identities
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compare two variables
by dmunoze (Initiate) on May 20, 2014 at 00:17 UTC | |
by project129 (Beadle) on May 20, 2014 at 01:27 UTC | |
by AnomalousMonk (Archbishop) on May 20, 2014 at 14:18 UTC | |
by AnomalousMonk (Archbishop) on May 20, 2014 at 14:28 UTC |