Afaik Perl does not know about backticks. If you want to execute system commands, system() function might be a better choice: system - perldoc.perl.org
Perl is able to parse text with regular expressions too.
Perl knows about backticks but it interprets them as strings in double quotes and make interpolation of variables. So $1, etc. are perl variables, not awks. But you can use:
This is because you have double quotes in your awk script, around the filename, final.txt:
I don't believe you need this. If you do, you can escape it by using the backslash (\), before each of them. The result should look like - \"final.txt\".