sub new { my ( $this,$id ) = @_; my $ua = LWP::UserAgent->new(timeout => 90,agent=> 'User-Agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.7'); $ua->cookie_jar( HTTP::Cookies->new('file' => 'cookies.txt','autosave'=>1)); $ua->conn_cache(LWP::ConnCache->new()); #$ua->show_progress(1); push @{ $ua->requests_redirectable }, 'POST'; my $self = {id=>$id, ua=>$ua}; }); bless $self, __PACKAGE__; }