in reply to Re: Extract Name of Parent Directory
in thread Extract Name of Parent Directory
if you *really* feel like reinventing the wheel
Well, if you really must, at least make it short.
my $dir = "/htdocs/project1/docs/file.html"; my $parent = (split /\//, $dir)[-2];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Extract Name of Parent Directory
by gellyfish (Monsignor) on Jul 17, 2003 at 10:29 UTC |