package FirstGoodURL; use LWP::UserAgent; use strict; use vars qw( $VERSION ); $VERSION = '1.00'; my $ua = new LWP::UserAgent; sub find { my ($class,@URLs) = @_; my $req; for (@URLs) { return $_ if $ua->request (new HTTP::Request HEAD => $_)->code == 200; } } 1; # go to http://www.pobox.com/~japhy/modules/ # for the module and its docs