in reply to Short Circuit Operator and Hash Assignment
Then, and only then, does the optimizer deal with the '1 &&' part. This is in contrast to using 'and' instead of '&&', which binds looser than = (and its sibling ||=). Try it out!$idx{$val} ||= (1 && push(@num, $val));
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|