In the strictest sense, it ``can't'' be done. However, there is special shell magic which may allow you to do it. I suggest checking out comp.unix.shell and reading the comp.unix.questions FAQ.
When perl is started, you are creating a child process. Due to the way the Unix system is designed, children cannot permanently affect their parent shells.
When a child process is created, it inherits a copy of its parents environment (variables, current directory, etc). When the child changes this environment, it is changing the copy and not the original, so the parent isn't affected.
If you must change the parent from within a perl script, you could try having it write out a shell script or a C-shell script and then using ``. script'' or ``source script'' (sh, Csh, respectively)
Other resources at this site: