in reply to Extract Name of Parent Directory
Though if you *really* feel like reinventing the wheel {grin}:
my $dir = "/htdocs/project1/docs/file.html"; my ($parent) = $dir =~ m#\A.*/([^/]+)/[^/]*\z#; print $parent, "\n";
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extract Name of Parent Directory
by cchampion (Curate) on Jul 17, 2003 at 07:10 UTC | |
by gellyfish (Monsignor) on Jul 17, 2003 at 10:29 UTC |