in reply to Short Circuit Operator and Hash Assignment

From the Camel (3rd ed.) pp. 87-88, you'll see that && has a higher precendence than =. So, your statement actually looks like:
$idx{$val} ||= (1 && push(@num, $val));
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!

------
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.