perl -wpi~ -e 'perl-command' file(s)
But you will run into these problems:
With GNU sed you will have the same problems.
usage: ped [-n] [-v] 'perl code' file(s)
options: -n no backup
-v verbose mode
example: ped 's/ /_/g' *.txt
ped can be also used as a stream editor for STDIN/STDOUT.
usage: ... | ped 'perl code'
example: ifconfig | ped 's/(.+?)\n\n/{$1\n}\n/sg'
Author: Ulli Horlacher