
japhy
Enthusiast
Jan 11, 2000, 9:16 AM
Post #1 of 2
(1311 views)
|
|
Module: FirstGoodURL
|
Can't Post
|
|
This is an announcement that seems rather apropos, since there have been a couple threads for link listing programs. I've just finished writing a module, FirstGoodURL.pm, that returns the first active (returns HTTP status code 200) link in a list... To use the module, simply place it in a directory (let's say /some/dir/foo), and do: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> use lib "/some/dir/foo"; use FirstGoodURL; @URLs = ('http://...', 'http://...', ...); $good = find FirstGoodURL @URLs; if ($good) { print "Found at $good\n"; } else { print "File not found\n"; } </pre><HR></BLOCKQUOTE> The module has builtin documentation via perldoc: perldoc FirstGoodURL will give you the documentation for it (if you're in the directory with the module, or the module has been placed with the other Perl modules on your machine). This module is available for downloading at: http://www.crusoe.net/~jeffp/modules/ You can download the tar-gzipped package, which allows you to officially install the module, or you can download just the module. I hope this module is useful for you. [This message has been edited by Jasmine (edited 01-11-2000).]
|