From qx
Similarly to system, if the string contains no shell metacharacters then it will executed directly.
Not sure what is included into "shell metacharacters" but a simple semicolon seems to suffice to force execution via the shell ...
lanx@ubuntu14-large:/tmp/sym$ perl -MCwd -E'say `pwd;` ' /tmp/sym lanx@ubuntu14-large:/tmp/sym$ perl -MCwd -E'say `pwd` ' /tmp/dir lanx@ubuntu14-large:/tmp/sym$
simplified code
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^5: Getting the absolute path of a script, without PWD (bug)
by LanX
in thread Getting the shell's version of working directory, without PWD's help
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |