in reply to Re (tilly) 2: Yet another one-liner
in thread Yet another one-liner
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 4 (BUG!): Yet another one-liner
by tilly (Archbishop) on Jan 12, 2001 at 06:43 UTC |