Help for this page
my $path = "/dir1/dir2/dir3/ .. /dirn-1/dirLast//"; my @pathary = split(/\//,$path); ... # pop @path; # also # my $parentpath = join('/',@pathary); # works print "$path\n$parentpath\n";
use Cwd; my $oldpath = getcwd(); ... $path = getcwd(); print "$path\n";