Coding in cold days.
<code>
sub get
{
$useragent = LWP::UserAgent->new;
$useragent->agent("A/B");
$useragent->cookie_jar($cookie_jar);
$useragent->requests_redirectable();
$response = $useragent1->request(GET "$_[0]");
$response->as_string;
$contenttoverify=$response->as_string;
while($_[0] =~ m!.*/(.*?)$!g){
$nametosave=$1;
$nametosave =~ s/\?/-/g;
}
open(OUT,">$nametosave.html");
print OUT $response1->as_string;
close OUT;
}
</code>
This may save an HTML file, but while I'm downloading a file, I can get a HEAD and also the binary system file (for example: an excel file).
How can I divide them properly and save it as an excel file?
--
------======Nerazzurri======------
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
