system("sed -ie 's/\(.*\)/Number => \1/' test.txt");
See the difference:
say "sed -ie 's/\(.*\)/Number => \1/' test.txt";
say qq{sed -ie 's/\(.*\)/Number => \1/' test.txt};
say q{sed -ie 's/\(.*\)/Number => \1/' test.txt};
__END__
sed -ie 's/(.*)/Number => /' test.txt
sed -ie 's/(.*)/Number => /' test.txt
sed -ie 's/\(.*\)/Number => \1/' test.txt
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.