tilly, your version:
perl -pi.bak -e 'BEGIN{$/=$u}s//\n/' foo*
Works fine with 5.00503, but with 5.6.0 it appends an extra newline to the file:
$ cat > XXX 1 2 3 $ cp XXX fxx $ perl5.00503 -pi.bak -e 'BEGIN{$/=$u}s/^/\n/' fxx* $ cat fxx 1 2 3 $ cp XXX fxx $ perl5.6.0 -pi.bak -e 'BEGIN{$/=$u}s/^/\n/' fxx* $ cat fxx 1 2 3 $
Curious.
In reply to Re: Re (tilly) 2: Yet another one-liner
by danger
in thread Yet another one-liner
by wardk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |