Hi, At reaching a certain point in my perl program, I need to run a process ( say XYZ ) using SYSTEM command. The result file that this process would produce will be result.<process_id>. I will have to wait until this result file is produced & then proceed extracting certain things from this file.
I am implementing this as : foreach $check (@run) { $pid=fork; if($pid == 0) { exec("XYZ -a $check"); }else{ $pid1=wait; } if ( -e "result.$pid1") { ## perform operations on the file result.$pid1## } system("rm result.$pid1"); } This seems to be performing inconsistently. I am seeing this working properly sometimes & not working properly sometimes. This works on certain workstations & doesn't work on certain workstations. Why is this inconsistency ?? I would be satisfied if I am given a clean/consistent/straight forward implementation methodology for my purpose. Thanks, Ravi -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>