david wrote:

how does simply putting a piece of logic in your code and print out an error meesage when a variable match a certain value prove something in Perl is either true nor false? this is simply impossible in Perl because you can never code a 3-way logic.


use strict;
use warnings;

my $test = 0;

($test) ? print "\$test exists"
        : ($test > 0) ? print "\$test greater then zero"
        : ($test < 0) ? print "\$test less then zero"
        : print "\$test is zero";

undef $test;

(undef, $test) ? print "\$test is defined"
               : print "\$test is undefined";

__END__

But I was asked not to confuse...
So ignore this posting...

-Sx-

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




Reply via email to