in reply to Re: Re: Short Circuit Operator and Hash Assignment
in thread Short Circuit Operator and Hash Assignment

You're hitting an edge case. The optimization had a different situation in mind:

if( 1 && foo() ) { . . . } elsif( 0 || bar() ) { . . . }

This optimization is hardly unique to Perl. I believe both C and Java compilers will optimize away constants in exactly the same way.

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated