Octavian Rasnita wrote:

> I want to verify if the file http://www.domain.com/xxx/xxx.zip which is on
> another site (not mine) exists.
> Please tell me what would be the simplest solution to test this, and how
> could I find out the size of this file.


lwp::simple would probably be your best bet:

use LWP::Simple;
my $url = 'http://www.foo.com/some/zip/file.zip';
my @head = head($url);

unless (@head) {
   print "error.  could not find the document.\n";
}
else {
   print "content-type:  $head[0]\n";
   print "document-length: $head[1]\n";
   print "modified time:  $head[2]\n";
   print "expires:  $head[3]\n";
   print "server:  $head[4]\n";
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to