in reply to Re (tilly) 2: Yet another one-linerin thread Yet another one-liner
(Update: If your files may contain null characters, make that perl -pi.bak -0777es//\\n/ foo* instead.)