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);
0 0
If an optimisation changes Perl's behaviour, it would be a bug.
In reply to Re^2: return if 0
by ikegami
in thread return if 0
by zigdon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |