If you're indeed using `perl -e ...` from inside perl, you need to add an extra layer of backslashes, as you're forgetting to protect against the extra interpolation due to the shell: you're running perl, invoking the shell (``) which in turn invokes perl. And your variables, esp. $_ hopefully is something very simple that parses as a single shell word.
(In case you're invoking `perl` from a shell script, just export $file, and you can then access the variable's content in Perl using $ENV{file})
Either way, do consider using single quotes instead of your double quote: `perl -e '...'`, which allows you to get rid of some backslashes...
HTH
Peter