in reply to using Net::Telnet to test Apache

Many people assume "telnet" is a simple raw network connection, and is thus suitable anytime you want to connect and test some TCP port. This really isn't the case. There is, in fact, a "telnet protocol" that describes all sorts of terminal negotiation. No doubt, this is what Net::Telnet was built for, so no, I don't expect this was what you were wanting.

Try using a simple IO::Socket to set up a TCP connection to your web server. You can then freely read and write to it as you need to.

my $s = new IO::Socket::INET ("www.example.com:80") or die "Couldn't connect: $!"; print $s "GET / HTTP/1.0\n\n"; if (<$s> =~ /HTTP\S+ ([345].*)/) { die "Error: $1"; } ...
An alternative (as another poster mentioned) is to use the LWP modules, which offer a complete HTTP client library.
use LWP::Simple; # or you could do more advanced stuff my $results = get("http://www.example.com/"); if (!defined($results)) { die "Error!"; } ...