Any suggestions for a better way of checking for success other then the old $? ? thanks for your time.# subroutine for mailing/transferring the changes sub mail_changes { my $mailer = "|/bin/mail -s $hostn $recipients < $disk_changes"; open (MAIL, $mailer) || die "Cannot execute mail command; $!\n"; close(MAIL); if ($? > 0) { print "Do some error stuff if needed\n"; } }
In reply to Checking mail command for success by ronix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |