gsee has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I have written a script which calls the system sendmail, which in most cases works well.
But when it fails on the close statement i am getting nothing back in $!
Here is the code:
if ( close(MAIL) ) { logger("DEBUG: Email sent to: $toList", 0); } else { logger("CRITICAL: Email Failed. $!", 1); }
The logger subroutine is a simpler print to file and exit if second parameter is 1
Is there something I am missing here? I really need to know why the close statement is failing so I can do something about it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sendmail not returning error info
by McA (Priest) on Nov 26, 2014 at 10:42 UTC | |
by gsee (Acolyte) on Nov 28, 2014 at 13:26 UTC | |
|
Re: sendmail not returning error info
by sam_bakki (Pilgrim) on Nov 27, 2014 at 03:50 UTC | |
by gsee (Acolyte) on Nov 28, 2014 at 13:29 UTC |