[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-beginners
Subject: Re: system("cd /home/tomer/temp") problem
From: Raymond Wan <rwan () kuicr ! kyoto-u ! ac ! jp>
Date: 2009-01-29 3:01:40
Message-ID: 49811C14.7020505 () kuicr ! kyoto-u ! ac ! jp
[Download RAW message or body]
Hi Tomer,
tomer wrote:
> after exectue the command system("cd /home/tomer/temp")
> I dont see the terminal change the direcotry?
> maybe the change is valid only in the script?
> how can i control "seeing" terminal direcotry with perl script ?
system might not be what you want. What it does is that it creates a new process in \
which to run your command (see http://perldoc.perl.org/functions/system.html); so \
that is one reason why you can't "see" the change.
If you want to change the directory, use perl's built-in function chdir:
http://perldoc.perl.org/functions/chdir.html
I think that is what you are looking for.
Ray
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic