http://www.perlmonks.org?node_id=798288


in reply to Re: How to modify words in a line using perl oneliner
in thread How to modify words in a line using perl oneliner

Maybe also add in boundaries, just in case? Firstly, blast, etc...

perl -ni.bak -e 's/\bfirst\b/last/g; print' one.txt
Just a something something...