Hi Guys,

I am writing a Perl script that needs to initiate various http (or https) requests. Before doing so, I would like first to verify that a given string is indeed a valid URL address. I would like to do so (preferably) without using regexp.
Reason being, that URLs can be quite complex, and I'd prefer using a generic perl method (like a module). That way I am waaay more probable not to have missed any end-cases. Also, it would increase code-readability.

Thanks a bunch,

5 Years
Discussion Span
Last Post by FelineHazard

Thanks that's exactly what I needed.
The URL might be online only sometimes. So first I check that the URL is valid, then that it is accisible, and depending on the result the answer would be logged and handled.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.