Sure - there may be some cases where you might want the symlink name rather than the target. But that's not what you've asked. Your question says "... without PWD". Why impose this arbitrary restriction? If you want what $PWD gives, why not just use it?


In reply to Re^3: Getting the absolute path of a script, without PWD by hippo
in thread Getting the shell's version of working directory, without PWD's help by perlancar

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":