in reply to Question regarding options like -i -n -p
I am not sure of what you want exactly, but if you want to get rid of bakcup files, you can do something like this:
$ perl -i.bak -pe 's/ / /g; END {unlink "*.bak"}' file.txtThis is *nix syntax, but I guess you could have this untested equivalent under Windows:
perl -i.bak -pe "s/ / /g; END {unlink qq/*.bak/}" file.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question regarding options like -i -n -p
by AnomalousMonk (Archbishop) on May 29, 2013 at 21:16 UTC | |
by Laurent_R (Canon) on Jun 01, 2013 at 21:24 UTC |