Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to change path

by meraxes (Friar)
on Oct 25, 2007 at 03:54 UTC ( #647068=note: print w/replies, xml ) Need Help??


in reply to How to change path

system is executing the cd command in a forked process and returns to your Perl script. As it's happening in a different process, the working directory of your script doesn't change.

Instead of the system call, use chdir:

chdir '/home/sa/temp';

update -- add links to docs
update the second... i'm guessing the downvote was because of my erroneous description of what system was doing (as eff_i_g explains better). Fixed description to better reflect that. That'll teach me to read the docs better.

--
meraxes

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://647068]
help
Chatterbox?
[Michael W]: So i can read ok from this how do i put data back inmy @Variables = ( $Map_Request_Date, $Map_Due_Date,$Map _Cutover_Date,$Map _Complete_Date,$Ma p_Approved_Date);
[Corion]: Michael_W: $Variables[0] = $Map_Request_Date; $Variables[1] = $Map_Due_Date; ...
[choroba]: ( $Map_Request_Date, $Map_Due_Date,$Map _Cutover_Date,$Map _Complete_Date,$Ma p_Approved_Date) = @Variables;?
[thezip]: something like: $Map_Request = <value>; etc. should work
[Corion]: Duh - I read it backwards. I shouldn't code today I guess ;)
[thezip]: G'day all, BTW!

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (15)
As of 2017-04-27 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (509 votes). Check out past polls.