in reply to Re: Re: Extract Name of Parent Directory
in thread Extract Name of Parent Directory

man, you guys have obviously never been paid by the line of code - let's use the power of timtowtdi to make this even longer:

my $file = "/htdocs/project1/docs/file.html"; my $elif = reverse $file; my $slash = index($elif,'/'); my $index = length( $file ) - $slash; $index--; my $dir = substr($file,0, $index); print $dir;
You know it makes sense ;-)

/J\