If you're using Filter::Simple (or any other kind of source filter), that can easily throw __LINE__ off from what you see in your editor (example).
Another situation where the line numbers deviate from the source code is when you have multiline if statements, but here Perl reports (for example in warnings) the location of the if, not the location where the reason for a warning was encountered.
I'm not aware of other situations where __LINE__ differs from what you see in your text editor, but maybe with creative use of here-docs, you can provoke them.