- or download this
chdir `perl -e 'print quotemeta("/some/path")'`
- or download this
$ cat script.pl
print("set var=val\n");
...
print("cd /some/path\n");
$ script.pl > temp_file && source temp_file && rm temp_file
- or download this
>type script.pl
print("set var=val\n");
...
print("cd \\some\\path\n");
>for /f "usebackq delims=" %%f in (`script.pl`) do %%f