Output:use File::Basename; my $file = '/htdocs/project1/docs/file.html'; my $parent = basename(dirname($file)); print "$parent\n";
docs
In reply to Re: Extract Name of Parent Directory
by ctilmes
in thread Extract Name of Parent Directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |