realpath absolutely does resolve links.
$ perl -MPath::Tiny -E 'say path("/home/ikegami/tmp")->realpath' /tmp/ikegami
There's also an example in the OP.
It's the only way to safely remove «..». Well, technically you only need to resolve links to the left of the «..».
In reply to Re^4: How to get the unique canonical path of a given path?
by ikegami
in thread How to get the unique canonical path of a given path?
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |