in reply to passing a command line argument
If you don't mask the $PATH, the output will suprise you ;-)... my $PATH = "!please don't show this!"; my $command = 'echo test.sh'; my $args = "\\\$PATH is a name"; # try: "\$PATH is a name"; print "args: ", $args, "\n"; print "dummy: ", $PATH,"\n"; my $output = qx{ $command $args }; # use qx for backticks! print "\ncommand line echo: ", $output, "\n"; ...
|
|---|