Can someone please tell me what the __END__ really does? if it is ignoring the remaining lines, why did it work for 2 years like this? What would be a better way to have this displayed on a IE page? Any assistance would be great!#!perl use strict; use warnings; use File::Copy; print "Content-type: text/html\n\n"; my @servers = (); for my $i (1..9) { push @servers, "serverpd0${i}"; } push @servers, qw (serverpd15); for my $server (@servers) { my $audit_file = "\\\\$server\\c\$\\program files\\maintenance\\au +dit.txt"; if (-e $audit_file) { copy($audit_file, "tmp\\$server.log") or die $!; } } print "<pre>"; print system("cat.exe tmp\\*.log | c:\\wbin\\sort.exe -k 3 -r"); print "</pre>"; exit; __END__ print qq { <html> <body style="margin:0;padding:1px;"> }; print "<table width='100%' cellpadding='1' border='1' style='border:1p +x black solid;border-collapse:collapse;font-family:tahoma;font-size:1 +1px;'>"; print qq{ <tr style="background:black;color:white;font-weight:900;"> <td>Timestamp</td> <td>Username</td> <td>Where From</td> <td>Record Type</td> <td>Record Data</td> <td>Field Name</td> <td>Action</td> <td colspan="13">Data</td> </tr> }; for my $timestamp (reverse sort keys %logs) { for my $entry (@{$logs{$timestamp}}) { print "<tr><td>"; my @temp = split("\t", $entry); splice @temp, 1, 3; unshift @temp, $timestamp; print join("</td><td>", @temp); print "</td></tr>"; } } print qq{ </table> </body> </html> };
In reply to Does __END__ really mean ignore rest of lines? by jaacmmason
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |