On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote:
> my $output = `myperlscript.pl 2>&1`;
> send_email($output) if $output;

Doubt:

Isn't send_email($output) in this situation still going to happen? I
mean, even of there is not output on "myperlscript.pl 2>&1", $output is
going to be set, meaning the validation (send_email if $output) will be
true.

Shouldn't this be set to something like:

send_email($output) if $output ne '';

Or how can this be handled on a more elegant manner?

Cheers,
David.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to