in reply to Re^4: Surprising behavior of Cwd module on Unix with symlinks
in thread Surprising behavior of Cwd module on Unix with symlinks
The portability problem with $ENV{PWD} is that it assumes Unix. `pwd` also assumes Unix.
You already mentioned that, and I already addressed that. It's still irrelevant and it's still wrong.
It's irrelevant because my solution isn't "use $ENV{PWD}".
It's wrong because the portability of $ENV{PWD} has nothing to do with unix (and even less to do with Unix). It's completely dependent on your shell. It won't work on all unix setups, and it will work on non-unix setups.
In addition, $PWD isn't a bashism. csh and ksh also populate it.
And does Cwd's chdir. Yes, I simplified. The point is that it's shell-specific.
|
|---|