Rajendra has asked for the wisdom of the Perl Monks concerning the following question:

I want to get whether a URL is valid or not. How can I get it? For me a URL contents saying "Invalid Request! Please check the url or contact XXXX@xxx.com for further assistance." is also invalid. How to identify such URLs. LWP::Simple also specifies the above contents as valid. Please help...

Replies are listed 'Best First'.
Re: Get valid url
by ww (Archbishop) on Jun 03, 2013 at 13:25 UTC
    RFC 1738

    If you didn't program your executable by toggling in binary, it wasn't really programming!

Re: Get valid url
by soonix (Chancellor) on Jun 03, 2013 at 22:12 UTC
    Your definition of "invalid" is incomplete.
    • "Formally valid" is easy.
    • 404 is relatively easy.
    • What about temporary failures? "Site maintenance, please check back in 5 minutes"?
    • "Bandwidth exceeded" - invalid for the rest of the month, then valid again?
    • What about corporate intranets - valid inside, invalid outside?
    • "This content is not available in your country?"
Re: Get valid url
by Anonymous Monk on Jun 03, 2013 at 12:49 UTC
    What means valid?
Re: Get valid url
by Anonymous Monk on Jun 03, 2013 at 13:29 UTC