exec() forks off a process and lets it run without caring about the return
process. It's kinda like UPD, you can exec as many processes as you want and
perl isn't too concerned with what happens with the processes.

system() forks off a process and waits for it to finish. It's like TCP, it
wants to know what happened. 

Also, you might take a look at the tainting chapter in PERL Programming,
making system called with double quotes "" can be dangerous if you're
putting any variables in the call. Which you're not, but if you've got time
might be good to review.

-----Original Message-----
From: Duston S. Horacek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 6:01 PM
To: perl
Subject: Help request for backup perl script



Spoke to soon as to my problem beign solved, what is happening now is that
the tar/zip operations are still running when my script copies ythe files
and dates them for the archive folder, the working part of the script is
something like

exec("tar -z -cf area.tgz ../Mud/area/ | cp area.tgz
archive/area_$backupdate.tgz");

How can I get it to wait between these to operations?

Thanks in advance for all the help.

Dincerly,
Duston S. Horacek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to