Perl: the Markov chain saw | |
PerlMonks |
How to modify words in a line using perl onelinerby Anonymous Monk |
on Sep 30, 2009 at 10:16 UTC ( [id://798278]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, I would like to modify the word "first" into "last" in the second line of file one.txt could you kindly help. Input File(one.txt)
I tried the following perl one liner, but it did not help. perl -ni.bak -e 'print s/first/last/' one.txt Thanks a lot.
Back to
Seekers of Perl Wisdom
|
|