Help for this page
#!/usr/bin/perl use strict; ... __END__ starting path: [/var/log/../../home/poletti/../../etc/passwd] abs_path : [/etc/passwd]
abs_path my $abs_path = abs_path($file); ... Uses the same algorithm as getcwd(). Symbolic links and re +lative- path components ("." and "..") are resolved to return the c +anonical pathname, just like realpath(3).