sub seqstore is declared inside a loop. I fear that @flankseq it closes around is the variable created in the first iteration of the loop, not the next ones. Declare your named subs at the topmost level unless you really know what you're doing, and send references to the arrays you want to change as arguments to them.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
}map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,