I'm trying to execute a system command from a perl program.
It works fine unless I provide a path, when it says " The system cannot find the path specified."
I get the same results with exec(), system(), or backticks.
I get the same results with the command string directly as the argument, or putting it in a single or double-quoted string and passing the string as the argument.
If I copy a non-working command from the perl script and paste it into the DOS box, it works, and vice versa.
For example,
print `cd`;
works fine, but
print `cd \`;
and
print `cd ..`;
give me the same error message.
$cmd = 'foo.htm'; $ret=`$cmd`
starts the browser, but
$cmd = '\foo.htm'; $ret=`$cmd`;
does not.
Does anyone have any suggestions as to what the problem might be?