
Checking if a URL exists in Perl
MCMXCIII in <URL::">
"" Hi !
"" I have a problem, and I cannot seem to overcome it.
"" I have a form in which the users add a url, and the cgi is supposed to check
"" if the url exists, and if
"" so, index it. Otherwise, throw an exception or something.. But I can't seem
"" to find how to check if
"" the file exists. Can you help me?
I am confused by this question. The user "adds" a URL, then the "cgi"
(I presume you mean 'a program using CGI to interface with the server',
as CGI is a protocol, on a program) checks whether the URL exists
(I'm not sure what you mean by "a URL exists" - you probably have in your
mind some restricted definition of "URL", and some idea what "exists"
means) and then you suddenly make the leap to "check if the file exists".
The answer to the latter is trivially found in the manual, so I won't
bother telling you. But what has that to do with URLs?
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----