Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Comment on

( #3333=superdoc: 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:

package Third; use Filter::Util::Call; $\ = $/; $, = ":"; print 4, __LINE__; ## Hello BEGIN { filter_add ( sub { $status = filter_read(); $_ = "" if /^##/; +return $status; } ); } print 7, __LINE__; ## World; print 9, __LINE__; #line 42 print 11, __LINE__;

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 reply to Re^2: Bad line numbers .. bad! by Eily
in thread Bad line numbers .. bad! by phramus

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (2)
    As of 2018-03-18 04:21 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (228 votes). Check out past polls.