Like this?
perl -pi.bak -e "s/ /_/;" infile.txt
See perlrun. For an on-site reference, see Re: One Liners (warning, I wrote that node).
Dave
Updated: fixed '-e'
In reply to Re: Lost in-place file edit code
by davido
in thread Lost in-place file edit code
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |