in reply to Re: 'and next' question
in thread 'and next' question
No, it is not the same at all. The if is a statement modifier and will always be tested first.Be careful though about using and this way. Since the precedence of and is extremely low, this is the same as saying:++$hash{$_} and next if $_ > 5;# Increment $hash{$_} then if $_ > 5 loop next ++$hash{$_} and (next if $_ > 5);
is, as one would expect, the same as:++$hash{$_} and next if $_ > 5;
$_ > 5 and (++$hash{$_} and next);
|
|---|