Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    __END__
    starting path: [/var/log/../../home/poletti/../../etc/passwd]
    abs_path     : [/etc/passwd]
    
  2. or download this
           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).