Clear questions and runnable code
get the best and fastest answer
after further investigation, it seems that `pwd` inside Perl doesn't default like pwd in bash ... which is unexpected
The answer is perhaps this in perlop for the qx//:
if the string contains no shell metacharacters then it will executed directly.
So although in general qx// uses the shell, if we say `pwd` then perl will execute /bin/pwd, which defaults to -P. If we say `bash -c pwd` then bash will execute its shell builtin version of pwd, which defaults to -L.