in reply to Re^2: sed regexp works on the command line, but not from Perl script
in thread sed regexp works on the command line, but not from Perl script
I'm sorry that my reply put you in such a defensive mindset about your code that you skipped the part where I explained the cause of your problem because I pointed out several other problems as well and I now see that I started every sentence that explains the problem with a pointer to another problem as well.
Let me repeat the essential part of my above reply:
... you are falling into the trap that backticks act like double quotes and all your backslashes get interpreted in the first round of backslash interpretation by Perl and never get seen by sed. Hence one solution could be to double all your backslashes to make sure that sed sees them.
|
|---|