Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I want to change the directory, but this change should be valid even after ending the script.
In the example given the script changes the directory to ".." and shows the content. But after ending the script I am back in the directory where I started the example and not in ".."
Is there a way that the script changes the directory not "locally" ?
many thanks
#!/usr/bin/perl system ("cd .."); system ("ls");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: change directory
by Corion (Patriarch) on Dec 21, 2016 at 10:35 UTC | |
Re: change directory
by hippo (Bishop) on Dec 21, 2016 at 10:39 UTC | |
Re: change directory
by choroba (Cardinal) on Dec 21, 2016 at 11:56 UTC | |
Re: change directory
by CountZero (Bishop) on Dec 21, 2016 at 15:29 UTC | |
by Anonymous Monk on Dec 24, 2016 at 13:55 UTC |
Back to
Seekers of Perl Wisdom