Hi,

Could some kind soul please tell me why the following
prints nothing for valid URLs?  I'm trying to write a
small, tight, and very fast script that'll check to
see if a URL is alive in the least amount of time
possible (and avoid using PING).  I need to check
thousands of URLs.  It seems to me that this should be
a relatively simple affair?  Below is some code I've
tried to adapt from the cookbook (example 20.1).  I
was also intrigued by the HTML:Status class mentioned
in the perldoc, but I can't seem to figure out how to
use it without employing the seemingly overkill
LWP:UserAgent.  

thanks in advance,

Drew.

---- snip ----
#!/usr/bin/perl -w

$|++;

use warnings;
use strict;
use diagnostics;

use LWP::Simple;

while (<>){
        print if (defined (my $content = get $_));
}
---- end of snip ----

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to