in reply to return if 0
It has to do with the if condition being a constant. See this old node: Re^3: A cleaner way of scoping variables.
No, it doesn't.
#!perl -l sub test_c { $x=2; return 1 if 0; } sub test_v { $x=2; return 1 if $_[0]; } print test_c(); print test_v(0); [download]
0 0 [download]
If an optimisation changes Perl's behaviour, it would be a bug.