#!/usr/bin/perl # Create a user agent object use LWP::UserAgent; use LWP::Simple; &surf; sub surf{ $ua = new LWP::UserAgent; $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.12  [en]' . $ua->agent); $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.12  [en]'); $req = HTTP::Request->new(GET => 'http://www.chollonet.com/trucoteca/truco.php?idjuego=598&plataforma=4'); #get rid if html @html=$ua->request($req)->as_string; print "@html"; }