#Create an instance of the webcrawler my $webcrawler = WWW::Mechanize->new(); my $url_name = ; # The user inputs the URL to be searched my $uri = URI->new($url_name); # Process the URL and make it a URI #Grab the contents of the URL given by the user $webcrawler->get($uri); #Use the HTML::TokeParser module to extract the contents from the website my @stripped_html; my $x = 0; my $content = $webcrawler->content; my $parser = HTML::TokeParser->new(\$content); while($parser->get_tag){ $stripped_html[0] = $parser->get_trimmed_text(),"\n"; print $stripped_html[0]; } exit;