I thought maybe you were gaining an advantage from the short circuit of && so I wrote a benchmark, but the times came back so close together that the difference is easily attributed to background processes. So I ran the deparser and found that perl converts this to an if(){} structure, which is (as you said) easier to read.
E:\Projects>perl -MO=Deparse -we "my $s; $_ && do { $s = $_ }" my $s; if ($_) { $s = $_; } -e syntax OK
In reply to Style Question
by Adam
in thread Strange Behavior while Parsing Sendmail logs
by Russ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |