Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    my @paths = $climb;
    push @paths, $climb until ($climb = $climb->parent) eq '/';
    say for @paths;
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    }
    shift @paths;  # Remove the empty path.
    say for @paths;
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
        $paths[$i] = join '/', @paths[0 .. $i];
    }
    say for @paths;