in reply to Does __END__ really mean ignore rest of lines?

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.

Replies are listed 'Best First'.
Re^2: Does __END__ really mean ignore rest of lines?
by DeadPoet (Scribe) on Jan 18, 2011 at 00:20 UTC

    The __END__ special value denotes the logical "end of file" for your program to the Perl interpreter. Everything that follows this special constant is treated as data and may be read via the filehandle.

Re^2: Does __END__ really mean ignore rest of lines?
by jaacmmason (Acolyte) on Jan 18, 2011 at 18:05 UTC

    Thank you for your suggestions. I have verified that the machines are all named correctly and do exist. The log files are in the correct path on each of the machines, and the Unix commands are in the correct area of the machine. My PATH also has the proper locations listed in it.

    I will try to determine if there is some other pgm calling this one. I have not done that as of yet. Thank you again for your time and the suggestions</>