Hello!
Sorry for clean Perl question, although I use Apache::ASP. mod_perl is only
one my perl related mail list.
Simple example
---------------------
my $test1 = undef;
my $test2 = 2;
my $test3 = $test1 or $test2;
print "Value - $test3";
---------------------
returns
---------------------
Value -
---------------------
when
---------------------
my $test1 = undef;
my $test2 = 2;
my $test3 = $test1 || $test2;
print "Value - $test3";
---------------------
returns
---------------------
Value - 2
---------------------
We can read "Programming Perl" Chapter 2.5
2.5.20 Logical and, or, not, and xor
As more readable alternatives to &&, ||, and !, Perl provides the and, or
and not operators. The behavior of these operators _IS IDENTICAL_ - in
particular, they short-circuit the same way.
Why?
Where I can read more about it, if it is not a bug ?
PS. I can't imagine that it is a bug!
------------------------------------
Sergey Polyakov - Chief of WebZavod.
http://www.webzavod.ru
Sorry for clean Perl question, although I use Apache::ASP. mod_perl is only
one my perl related mail list.
Simple example
---------------------
my $test1 = undef;
my $test2 = 2;
my $test3 = $test1 or $test2;
print "Value - $test3";
---------------------
returns
---------------------
Value -
---------------------
when
---------------------
my $test1 = undef;
my $test2 = 2;
my $test3 = $test1 || $test2;
print "Value - $test3";
---------------------
returns
---------------------
Value - 2
---------------------
We can read "Programming Perl" Chapter 2.5
2.5.20 Logical and, or, not, and xor
As more readable alternatives to &&, ||, and !, Perl provides the and, or
and not operators. The behavior of these operators _IS IDENTICAL_ - in
particular, they short-circuit the same way.
Why?
Where I can read more about it, if it is not a bug ?
PS. I can't imagine that it is a bug!
------------------------------------
Sergey Polyakov - Chief of WebZavod.
http://www.webzavod.ru