Use the -i(extension) switch to make the changes in-place.
perl -pe '$_.=$/' file [download]
In reply to Double space a file by jmcnamara