Okay you geeks, here’s something that’ll occupy all your free time this weekend – how to Embed Web Servers into your application:. Here’s the short-n-sweet from the linked page:
… it isn’t hard to write your own simple Web server. There are several ways to do this and a few already written on CPAN. We’re going to start from first principles though, and pretend, for the moment, we don’t know about CPAN.
Nothing like re-inventing wget.
For the rest of you scratching your heads saying, huh? what? Here’s the deal. I needed to track down a spammer who advertised a page using a series of redirects. Using wget from my server, I’m able to hunt down the final location and then complain to the spammer’s upstream web hosting provider. Here’s an example on PerlMonks of how to roll wget into your Perl application.