perl -e '$foo="bar";print $foo' #### #!/usr/bin/perl -s print $foo; #then in the command line #file.pl -foo=bar