http://qs321.pair.com?node_id=999883

nvivek has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, I want to replace a particular content in my file with some pattern. I planned to use sed with -i option to replace the pattern and make the changes effect in a original file. My sample file content ( test.txt ) : 1 2 3 4 My script is as follows:
use strict; use warnings; system("sed -ie 's/\(.*\)/Number => \1/' test.txt");
When I executed the script, numerals aren't changed to Number => 1. It remains same. Note: When I executed the sed command in shell prompt, it replaced the content of file properly as Number => 1 properly.