in reply to Confusing warning with if/elsif/else

This is a known issue that I beleive is being or has been or will be fixed for the next major release. But the rule the thumb for warnings and errors is to look at the line and then the general area. Perl often emits a confusing mishmash of warnings and errors which will all resolve once you find the correct one and fix it.

---
$world=~s/war/peace/g

  • Comment on Re: Confusing warning with if/elsif/else

Replies are listed 'Best First'.
Re^2: Confusing warning with if/elsif/else
by robin (Chaplain) on Dec 09, 2005 at 09:58 UTC
    Yes. This is a very old and popular bug, which gets reported all the time.

    Although it has been talked about on p5p, it hasn't been fixed. It’s actually a fundamental problem with the way that perl keeps track of the line number, and the proposed fix is to store the line number in every single op.