in reply to arguments to perl -e

The question is how to get the $var variable into the perl code since I apparently can not get in is as regular argument while using the -e parameter.
Of course you can. There is no need for @ARGV to only contain a files list.
perl -le 'print shift' foo
If the variable contains spaces, you may have to quote it.

You can even combine this with a file list passed as parameters:

perl -e '$x = shift; while (<>) { print "$x: $_" }' $2 $1
or even
perl -nle 'BEGIN { $x = shift } print "$x: $_"' $2 $1