http://www.perlmonks.org?node_id=1038884


in reply to Fast Replacement

Assuming you want to replace all occurrences within the file, why not just use perl command line.
perl -pi -e 's/!/\n/g' <filename>