|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: sed isn't working within a perl scriptby aitap (Chaplain) |
| on Oct 19, 2012 at 12:08 UTC ( #999915=note: print w/ replies, xml ) | Need Help?? |
|
system("sed -ie 's/\(.*\)/Number => \1/' test.txt");See the difference: Double quotes do interpolate your backslashes, and they are lost when you run the command. You need a non-interpolating quote operator instead to pass your string unchanded to the shell. And I strongly advice you to use native Perl code instead, too.
Sorry if my advice was wrong.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||