in reply to Re^2: using Mime::Lite
in thread using Mime::Lite
What do you expect $_ for $trap->die, $trap->stdout, $trap->stderr; to do? It seems a noop to me. And $_ will be empty after that for-loop because the scope of the $_ in the for-loop ends with the loop. So testing $_ afterwards makes no sense, the if statement will never be executed
Maybe you wanted to do print $_ for $trap->die, $trap->stdout, $trap->stderr; so that you at least can see when some message is printed on STDOUT or STDERR?
Or you might have something like this in mind:
my $allmessages.= $_ for $trap->die, $trap->stdout, $trap->stderr; if (!$_sendError and $allmessages) { $_sendError = $allmessages; }
which would concatenate the values from all three methods and return that later
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: using Mime::Lite
by ukndoit (Sexton) on Aug 19, 2009 at 02:10 UTC | |
by roboticus (Chancellor) on Aug 19, 2009 at 10:49 UTC | |
by jethro (Monsignor) on Aug 19, 2009 at 11:49 UTC |