A shell script can't do it either, for much the same reason. In most shells you can use a shell function to affect the current shell's environment. If your Perl script needs to determine what directory to go to, you can just have it print that out, then use cd `your_script` in the shell function to actually change to that directory.
For example, here's a Bash shell function using a perl script:
function test() { cd `perl -e 'print "/tmp\n";'`; }
In reply to Re: Re: Re: shell cd within perl script
by sgifford
in thread shell cd within perl script
by qq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |