in reply to Reading mail ids from text file

I don't get what your code shall be good for, but after reading what you wrote in the CB, I think this might help
$file = "pp.txt"; open (FH ,$file) || die ("could not openfile"); while (<FH>) { s/[\012\015]+/ /g; s/\@/\\@/; print; } close (FH);

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e