Crossposted to
StackOverflow. It's considered polite to inform about crossposting to eliminate duplicate effort by people not visiting both sites.
Your usage of the first -e is correct, it checks the existence of a file. The second usage seems to interpret -e as a search of the given word in the file named $filename. How could Perl know what interpretation to use when, how should it guess what file to search in the latter case?
See also open and readline.
($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,