jevon has asked for the wisdom of the Perl Monks concerning the following question:
I found dirname
oops. Forget it!
Hello Monks,
Given the string "/dir1/dir2/dir3/ .. /dirLast//"
is stored in a variable $myDirectory
How do I extract the entire path up to "/dirLast"?
Put simply, I want the path to the parent directory
of $myDirectory.
Thanks
Jevon
oops. Forget it!
Hello Monks,
Given the string "/dir1/dir2/dir3/ .. /dirLast//"
is stored in a variable $myDirectory
How do I extract the entire path up to "/dirLast"?
Put simply, I want the path to the parent directory
of $myDirectory.
Thanks
Jevon
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parent directory - regex
by gawatkins (Monsignor) on Jun 17, 2004 at 12:05 UTC | |
Re: Parent directory - regex
by davidj (Priest) on Jun 17, 2004 at 12:39 UTC | |
Re: Parent directory - regex
by pbeckingham (Parson) on Jun 17, 2004 at 13:06 UTC | |
Re: Parent directory - regex
by periapt (Hermit) on Jun 17, 2004 at 12:30 UTC |
Back to
Seekers of Perl Wisdom