Try $result = `rsh $plant /u1/bin/forkit '/u1/bin/work.pl'`;
print $result; You are storing the output of the rsh... command into the variable. You can now run a regex on that to check for success/failure. I don't know what the output should be but as an example... $result = `rsh $plant /u1/bin/forkit '/u1/bin/work.pl'`; if ($result =~ /worked/i) { print "Yep, that worked\n"; } else { print "Ooops. Something went wrong: $result"; } HTH John -----Original Message----- From: Alex Harris [mailto:[EMAIL PROTECTED]] Sent: 01 February 2002 16:52 To: [EMAIL PROTECTED] Subject: still not catching error I took out the exec and placed system. But even though work.pl doesn't exist on the remote system, still getting no error. Help! if (system("rsh $plant /u1/bin/forkit '/u1/bin/work.pl'") > 0) { excep(" $!\n"); } _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------Confidentiality--------------------------. This E-mail is confidential. It should not be read, copied, disclosed or used by any person other than the intended recipient. Unauthorised use, disclosure or copying by whatever medium is strictly prohibited and may be unlawful. If you have received this E-mail in error please contact the sender immediately and delete the E-mail from your system. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]