On Jun 13, 6:26 am, [EMAIL PROTECTED] ([EMAIL PROTECTED])
wrote:
> Hi All,
>
> 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.

I haven't used perl that much either, but I think that the code you
are using only changes the cwd within the script and not externally
similar to the scope of variables i.e. a variable cannot be seen
outside of the block it was defined in.

Sorry if that doesn't make sense.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to