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:
Machines named serverpd01, serverpd02....serverpd09 and serverpd15. Do those machines exist? Has anyone renamed any servers recently?
On each of those machines you need to have log files with the name C:\Program Files\Maintenance\audit.txt. Do those files exist on serverpd01 etc?
The commands cat.exe and c:\\wbin\\sort.exe must exist on the machine where this script is running. Do they?
C:\wbin\sort.exe uses a fully qualified path, but cat.exe does not. What is the setting of the PATH environment variable inside the script? (add the line print STDERR "PATH=<", $ENV{PATH}, ">\n" to see). Is cat.exe on that path? If not, the script will fail.
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |