Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Bad line numbers .. bad!by Eily (Monsignor) |
on Jul 25, 2013 at 21:05 UTC ( [id://1046424]=note: print w/replies, xml ) | Need Help?? |
I tried that, it was actually lines that ended only with a carriage return that didn't increment the value of __LINE__. It's probably what causes phramus's problem I guess. If not, I only know of two other ways to have __LINE__ (which is replaced at compile time, so should not be affected by runtime operations) corresponding to something else than what seems obvious: source filtering and the #line directive:
4:4 7:7 9:8 11:42 There the source filtering removes all lines starting with two #, but it has no effect on lines before the filter function is added, even though it's in a BEGIN block. So if the problem is source filtering, it has to be from a module included earlier (in the command used to run the script for example). And well, if phramus used #line 42 like comments in his script to keep track of the line number, that's tough luck.
In Section
Seekers of Perl Wisdom
|
|