in reply to Yet another one-liner

And yet another way to do it:

perl -pi.bak -e 's/^/\n/ if 1..1;$.=0 if eof' foo*