I'm wondering if it's possible to get/recreate the version of working directory that is the same as the bash version given via PWD environment variable, without using the PWD (I'm thinking no). With Cwd's getcwd() and friends, symbolic links are resolved. I want absolute path of working directory
but with symbolic links not resolved like the version bash gives me in PWD, which might have some symlinks in its elements.
% mkdir dir1
% ln -s dir1 sym1
% cd sym1
% echo $PWD
% perl -MCwd=getcwd -E'say getcwd'
UPDATE: Correct the title and wording of what I am asking.