On Jun 13, 1:26 am, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > I'm pretty new to Perl. I was trying to write up a perl script that > can help set up my working env, for example, once log into Linux > server, run the perl script, it'll move to another folder and > configure some env variables. > > I tried using > `cd dest_folder` or > system "cd dest_folder" or > exec "cd dest_folder" > > but after running script, the current folder doesn't change at all. > Anyone please shed some lights on this.
perldoc -q environment In short, you can't. A child process (ie, your Perl script) cannot affect the environment of its parent process. (ie, your shell) This has nothing to do with Perl, and everything to do with how Unix works. Paul Lalli -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/