Hi,
I have a Perl function which executes a series of "install" commands from a source CD to a destination folder on the hard drive-
my $cmd = "install -m 755 $srcdir/$file1 $installdir";
my $op = system($cmd);
$cmd = "install -m 755 $srcdir/$file2 $installdir";
$op = system($cmd);
$cmd = "tar -zxf $file1";
$op = system($cmd);
...when these statements are executed first, only $file1 gets installed to the $installdir. The second time I execute these statements, $file2 gets installed and the third time, untaring takes place. In short, all three commands are not executed in sequence on the same execution; I have to execute the program thrice to get the desired result. The size of $file1 is big, so it must be taking sometime to copy from the CD to the HD; but doesn't system command return to the execution of main program only when it is done executing the child process?
Also, apart from the return values, are there any other differences between the system command and the qx command?
All help is highly appreciated.
Thanks.

-Neelay.


Reply via email to