Or a recursive solution.....
use strict; use warnings; sub worker { my $dirsep = shift; worker ($dirsep, @_[0 .. $#_ - 1]) if ($#_ > 1); # terminator print join($dirsep, @_), "\n" } worker("/", split("/", "/usr/bin/foo/bar/baz"));
--MidLifeXis
In reply to Re: List directory(s)
by MidLifeXis
in thread List directory(s)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |