
Checking if URL is valid/exist using PERL
MCMXCIII in <URL: :">
++
++ vanja> Is it possible to check if URL is valid (if it exists) using
++ vanja> PERL? I am sure that I have seen something about that topic on
++ vanja> Dejanews few days ago, but there's no way in hell I can find
++ vanja> that message again.
++
++ vanja> If someone can point me to any direction...
++
++ Yes:
++
++ use LWP::Simple;
++ print "it's valid" if get $url;
++
++ Can't be much simpler than that.
Really? Then what's all this mumble-jumble about validating email
addresses? Mailto: URLs are just a small subset of the possible
URLs. Furthermore, just because you cannot get a certain HTTP url doesn't
mean the URL isn't valid/non-existing - partly for the same reasons you
cannot validate email addresses.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))