If you're responsible for more than one web server, or multiple services on one or many servers (SSH, FTP, Web, etc). It can be a little difficult to make sure all your services are up and running. There are several programs on the web that assist in monitoring servers, some of which even email you when a machine or service goes down. Since we're trying to learn more about Perl, though, let's roll our own simple CGI solution for monitoring the status of multiple servers and services.
First things first, we'll need to pull in a couple of Perl modules that you might or might not already have installed. They are IO::Socket and CGI. One is for basic socket communications, and the other (as expected) makes creating CGI applications a snap.