in reply to Re^3: catch die from say
in thread catch die from say

Hi Monks, I changed the way of doing it and the following code seems to work perfectly, even in the case of an error generated by Telus. The culprit was the pipe "|" which sends to a bash script and do not return. Thanks for all the effort. And I removed the "\n", which got the variables unrecognized by mailx.
#! /usr/bin/perl $email_message="test de Pierre"; $email_file ="/httpd/bureau.testchiro.ca/temp/sms"; $email_subject="test9"; $recipient="5555555555\@msg.telus.com"; $from = "nepasrepondre\@testchiro.ca"; system ("mailx -q $email_file -r $from -s $email_subject $recipient"); END { my $redirect = "http://192.168.0.10/index.html"; print "Location:$redirect\n\n"; }