Perl: LWP::Simple
LWP::Simple
$url = "http://webmaster.merrimack.edu/simple.html";
print "Content-Type: $header[0]\n";
print "Content-Length: $header[1] bytes\n";
print "Last Modified: $header[2]\n";
print "Expires: $header[3]\n";
print "Server: $header[4]\n";
print "Document:\n$content\n";
This example retrieves the merrimack.edu home page, and prints out the main headers and the HTML text