Change directory 
Author Message
 Change directory

hi, all...
        I was trying to change directory in my program under UNIX. It seems
sucessful, but when I get back to the prompt, I remained at the old
directory instead of the new one...also, how do I run a DOS command
with some user inputs in perl? I keep getting the error meassage
"Environment too small"...thanx in advance

Kian Beng



Thu, 17 Jul 1997 12:27:57 GMT  
 Change directory

Quote:
>    I was trying to change directory in my program under UNIX. It seems
>sucessful, but when I get back to the prompt, I remained at the old
>directory instead of the new one.

Yup, that's how Unix works.

If you want your shell to change directory, you must make the shell
execute a 'cd' command.  If, say, the only thing your perl script
ever prints, is the name of the name of the directory you want to
got to, you can type

        cd `perlscript`

in the shell and the shell will run your script, replace the `...`
by what it printed and change directory.

--
HansM



Sun, 20 Jul 1997 04:22:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. howto: change directory and run system command

2. Perl script to change directory

3. probs with changing directories???

4. Script won't write to file or change directory

5. Tar'ing files and changing directory in the tar file using Archive::Tar

6. Net::FTP how can I change directory?

7. How To change directories

8. changing directories

9. changing directories

10. Changing Directory Problems

11. Change Directory

12. system() method won't change directories!

 

 
Powered by phpBB® Forum Software