first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Perl: Returning the Last Five Errors from a Server Log

#!/path/to/perl open(CMDPIPE, "tail -5 /path/to/server/error/log |"); print "Content-type: text/html\\n\\n"; print "<HTML>\\n"; print "<PRE>\\n"; print <CMDPIPE>; close (CMDPIPE); print "</PRE>\\n"; print "</HTML>\\n";

mod date: 1998-12-17T16:54:44.000Z