in reply to Re: Help with exercise
in thread Help with exercise

I know I didn't create any. Right now, my script won't change into the directory given as an argument. For example, inside my ubuntu terminal I created a directory called test. then I tried to run the script with "test" as an argument. I expected to then be inside of test. Nothing happened.

Replies are listed 'Best First'.
Re^3: Help with exercise
by huck (Prior) on Sep 23, 2017 at 01:03 UTC

    Any changes to what is the current directory made while running perl disapear when perl ends.

    in your perl script add

    use Cwd; print 'Cwd:'.getcwd."\n";
    after the
    chdir($Dir);
    and you will see that you did move to that directory while perl was running.

      Thanks. I wAS expecting a bash-type cd
        cd in a bash script doesn't effect the parent process either.