http://qs1969.pair.com?node_id=910556


in reply to Re: LWP::Simple to judge the url
in thread LWP::Simple to judge the url

LWP::Simple does head just as well. And it might be simpler to use.
head($url)
Get document headers. Returns the following 5 values if successful: ($content_type, $document_length, $modified_time, $expires, $server)

Returns an empty list if it fails. In scalar context returns TRUE if successful.