Perl Monk, Perl Meditation | |
PerlMonks |
Re: Confusing warning with if/elsif/elseby fergal (Chaplain) |
on Dec 08, 2005 at 10:40 UTC ( [id://515201]=note: print w/replies, xml ) | Need Help?? |
Why are you blaming strict? Delete use strict and the problem still appears.
The problem is perl's parser/interpretter which doesn't properly record the line number of the various bits of an if. Consider:
Which says
Basically everything in the conditions of an if statement appears to be on the same line as the if. It sucks but it's a known issue and not likely to be fixed any time soon. If I recall correctly, the way perl currently works, to fix this would mean that each block in the if would require it's own stack frame, which is too much overhead.
In Section
Meditations
|
|