First, allow me to complement you for reading the site FAQs, and using the <code></code> tags.
I'd probably start by creating an array to hold the values you're searching for, and using a for loop to check for each of those values. That way, adding new ports becomes pretty simple. It's not *the* most efficient way, but your script is hardly going to take a server to it's knees. And we're told that maintainability is worth more than a little performance hit.
For checking for file size, use the '-s' operator. This returns the size of the requested file. '-z' will tell you if the file is zero-length or not. 'perldoc -f -s' will tell you about these.
For mailing the results, check out the
Mail::Mailer module. This will allow you to easily send mail. There are actually a couple of modules for sending e-mail. Some will argue that some are better than others, for whatever reasons. This one would be a good place to start, and you can poke around in the Mail:: and Net:: area on CPAN for other modules.
--Chris
e-mail jcwren