in reply to Command Line Arg contains Variable and more
You could also create environment variables that the shell will be happy to interpolate for you.
The above is basically the same as$ perl -e'$ENV{host}="localhost"; system $ARGV[0]' 'echo $host' localhost
$ host=localhost sh -c 'echo $host' localhost
|
|---|