in reply to LWP::Simple to judge the url

See the ->head method of LWP::UserAgent. The Content-Type header of the response should tell you what content the page sends back.

Replies are listed 'Best First'.
Re^2: LWP::Simple to judge the url
by bart (Canon) on Jun 20, 2011 at 11:34 UTC
    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.