in reply to Kindly let me know what exactly && does in Perl
I thought that the && would sort of "short circuit"
It does, but it is a logical operator hence this:
## The left side is false, so it short circuits ## and the residual value assigned is 0 my $x = $zero && $two; ## The left side is true, so it checks the right side which is false; ## so the residual value comes from the right side and is 0 my $y = $three && $zero; ## The left side is true, so it checks the right side which is also tr +ue; ## so the residual value comes from the right side and is 3 my $z = $two && $three;
|
|---|