in reply to symbolic link and absolute path
In contradiction to what you claim, that code doesn't run. I'm going to assume you imported abs_path refers to abs_path from Cwd.
abs_path takes a path relative to the current work directory and converts it into an absolute path.
However, readlink returns a path that should be treated as relative to the directory in which the symbolic link is found.
You could use a means of finding the absolute path that allows you to specify the base directory, but there's a simpler solution here:
my $absolutepath = abs_path($lpath);
|
|---|