in reply to One-liner to fix LaTeX quotation marks

If you want to override existing file you can use -i option: perl -i -pe 'your script' file.txt