#!/usr/local/bin/perl -w # sends the contents of server log files to your web browser # make sure they're readable by the http server process @logFiles=('/var/log/ping.log', '/var/log/messages'); print "Content-type: text/plain\n\n"; foreach $file (@logFiles) { print "***> $file <***\n"; open F, $file or print "Cannot open $file\n"; while () { print; } close F; print "\n\n"; } exit(0);