On Thu, 18 Jan 2007 20:28:42 -0600, David Moreno Garza wrote:
> On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote:
>> my $output = `myperlscript.pl 2>&1`;
>> send_email($output) if $output;
> 
> 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 '';

Ahem.  What makes you think that '' would be considered a true value?
perldoc perlsyn.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/


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


Reply via email to