in reply to Reading parent directory path
Assign this to a variable if it prints what you want.
use strict; use warnings; use Cwd; use File::Spec; my $parent = Cwd::realpath(File::Spec->updir); print "Parent directory: $parent"; [download]