Can you try this ? system ("tar cvf ../test.tar *.grib"); if ($? == 0) { print "\nSuccess!\n"; } else { print "\nUnsuccessful!\n"; }
The return code is in the perl $? variable. See perldoc perlvar for details. -----Original Message----- From: siren jones [mailto:[EMAIL PROTECTED]] Sent: 07 May 2002 17:38 To: [EMAIL PROTECTED] Subject: Testing for command success I'd like to test the following command to see if it ran successfully? Have no idea how or which variable stores the success of a command ($!, $], $_ )? system "tar cvf ../test.tar *.grib"; Tried: if (system "tar cvf ../test.tar *.grib";) { print "\nSuccess!\n";} got: "Command not found" Thank you in advance. -s _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- 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]