in reply to splitting a sequence using unpack
Now suppose i wish to change the reading frame. Consider the string once again:@triplets = unpack ("a3" x (length($line)/3), $line);
to which i obtained as array elements:atccatccctttaat
But what if i also wish to obtain the following array elements from the same string(using a different reading frame):atc cat ccc ttt aat
(Discard the final at in this reading frame) And a third reading frame should give me the following array:tcc atc cct tta
(Discard the final t in this reading frame) Is it possible to obtain all the three different kinds of arrays i've outlined using unpack? Or would i have to turn to regex's.cca tcc ctt taa
|
|---|