in reply to Re: return if 0
in thread return if 0
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.
|
---|