in reply to Script behaving differently on Linux vs windows

Your input file has DOS line endings, i.e. even after chomping the line, it still ends in a "\r". This special character moves the cursor to the beginning of line without moving to the next line, and the concatenated string than overwrites the beginning of the line.

Run your input file through dos2unix or fromdos on Linux.

($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,