suneel.reddy has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
Can anyone help me in finding the parent directory path, I don't have any inputs for current directory also. I just need to find the parent directory path from where my script is
I also have a script which only prints parent directory, where as I need to store it into a variable,
---------------------------------------
use strict;
use warnings;
use Cwd;
use File::Spec;
print Cwd::realpath(File::Spec->updir);
---------------------------------------
Thanks in advance
Suneel
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading parent directory path
by Corion (Patriarch) on Sep 17, 2012 at 11:07 UTC | |
|
Re: Reading parent directory path
by marto (Cardinal) on Sep 17, 2012 at 11:07 UTC |