What do you *really* want to do? What's the purpose? Maybe there's a better version than the simplistic approach:
... my $filename = '/usr/local/bin/perl'; # get tree parts my @parts = $filename =~ m{ [^/]+ (?=/) }xg; # build tree for my $p (0 .. $#parts) { printf "%d. /%s/\n", 1+$p, join('/', @parts[0..$p]) } ...
Regards
mwa
In reply to Re: List directory(s)
by mwah
in thread List directory(s)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |