- or download this
# "$ _" is really "$_", and change the qq to a double-quote
$_ =
...
s|.*(\w).*(\w).*\n|$_{$-++ / 9 % 2 ? $2:$ 1}|gex;
s|(.)(.)(.)(.)|chr (64*$1 + 16*$2 + 4*$3 + $4)|gex;
eval
- or download this
@_{A => C => G => T => } = 0..3;
# is really...
@_{'A', 'C', 'G', 'T'} = 0..3;
- or download this
s|
.* # greedily match
...
# strand (see physi's comment for a visual representation of this)
$_{$-++ / 9 % 2 ? $2:$ 1}
|gex;
- or download this
s|
# store next four characters into $1,$2,$3, and $4
...
# replace with a Base4-to-ASCII conversion of those characters
chr (64*$1 + 16*$2 + 4*$3 + $4)
|gex;
- or download this
use strict;
...
print "$fmt\n";
}
}