It depends on what you mean by "ignore". __END__ tells the Perl interpreter not to interpret and execute anything after it. If that is what you mean by "ignore", then yes, it really does mean "ignore". Under certain circumstances, those lines can still be read in as data, via the DATA file handle as Anonymous Monk said above, but they will never be executed by typing perl "myscript.pl on the command line, nor by using do "myscript.pl" in a Perl script.

Has your surrounding environment changed? This script is very dependent on the network it is part of. For it to work, you need the following:

I doubt the code below the __END__ has much to do with your problem. It looks to me like someone was trying to quickly comment out an old attempt to format the log file information. The current script uses a different technique: it runs a shell command and dumps the output between <pre> tags. (last three lines before exit)

As this script only prints out a content type declaration and a <pre>....</pre>, I strongly suspect that you will need to hunt down another script that runs this code and takes the output and inserts it into an actual HTML page.

There is a small possibility that some other script is populating %log, reading the stuff after __END__ as data, eval'ing it, and inserting the contents into an HTML page. But again, this means that the real work, and possibly your problems, are due to changes in this other script or the environment it relies on.


In reply to Re: Does __END__ really mean ignore rest of lines? by ELISHEVA
in thread Does __END__ really mean ignore rest of lines? by jaacmmason

Title:
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, details, 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, summary, 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.