This question already has an answer here:
- Getting Error with system() in perl 1 answer
I am running this command on linux shell it works smoothly
sed -i 's/\[-.*-]//g' error .txt
What it does is it removes patterns like [-any text-] along with the brackets and - sign.
but when I try to run it through perl script , it removes only '-' sign.
I tried to use
system("sed -i 's/\[-.*-]//g' error.txt");
Please what I am doing wrong?