2012/11/30 Aureliano Guedes <[email protected]>:
> Quanto ao and e o &&, o && consome menos memória que o and, por ser short
> circuits??

Não. A única diferença é a precedência. Ambos fazem "short circuit".

pirl @> sub { $x and $y }
sub {
    package Shell::Perl::sandbox;
    use warnings;
    use strict 'refs';
    $y if $x;
}
pirl @> sub { $x && $y }
sub {
    package Shell::Perl::sandbox;
    use warnings;
    use strict 'refs';
    $y if $x;
}
_______________________________________________
Rio-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/rio-pm

Responder a