% pwd /home/foo % mkdir dir1 % ln -s dir1 sym1 % cd sym1 % echo $PWD /home/foo/sym1 % perl -MCwd=getcwd -E'say getcwd' /home/foo/dir1