[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] web link validator



On Sat, 19 Sep 1998 03:21:48 -0700 (PDT), Xah Lee wrote:
>
>
>A Very simple question.
>
>I want to check if an URL is valid. How to do it? (what module to use?)

LWP:: Simple.

>
>Background:
>I'm trying to write a simple link validator as an exercise.
>What's a an existing validor as a perl module that I can look at?
>
>Btw, the app BigBrother is a link validator for the mac. It's homepage
can be easily found.

It's no longer being developed for MacOS. The developer got fed up with
with problems he was having with Open Transport, and switched to Linux and
New Trash . (That said, the still availible MacOS version works much
better for me than the LinuxPPC version.)

>
>Btw, I knew that I can get the content text by using, e.g.
>
>use LWP::Simple;
>my $content = get(qq($url));
>
>But this is overkill.

So you use head() instead. Check the docs to make sure, but I believe you
can

if (head ($urI)) {
# do something
}

>
>Thanks.
>
> Xah, xah@best.com
>
http://www.best.com/~xah/PageTwo_dir/Personal_dir/bookReviewRichardGabriel.
html

> Little penguins make way: GNU HURD is coming! <www.gnu.org>
>

-------
Paul J. Schinder
schinder@pobox.com


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch