http://qs1969.pair.com?node_id=652468


in reply to resolving symbolic links in a pathname

I think you want abs_path in Cwd.