in reply to Deleting EOF from a file

If by EOF you mean the End Of File marker then depending on the OS this may or may not work:

perl -pi -e's/[\cZ\cD]//g' file

/J\