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