Help for this page

Select Code to Download


  1. or download this
    use File::Spec::Unix ();
    
    ...
       s#^[^/]+/\.\.$#.#g;
       return $_;
    }
    
  2. or download this
    printf("%-20s -> %-20s\n", $_, remove_dot_dot($_))
       foreach (qw(
    ...
    /foo/bar/../..       -> /
    /foo/bar/../../moo   -> /moo
    /var/log/../../home/poletti/../../etc/passwd -> /etc/passwd