#!/usr/bin/perl -w print "Content-type: text/html\n\n"; use LWP::Simple; my $content = get("http://www.yahoo.com"); #Store the output of the web page (html and all) in content if (defined $content) { #$content will contain the html associated with the url mentioned above. print $content; } else { #If an error occurs then $content will not be defined. print "Error: Get failed"; }