Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: perl module to determine if a URL is valid?

by ccn (Vicar)
on Sep 20, 2009 at 18:57 UTC ( #796408=note: print w/ replies, xml ) Need Help??


in reply to perl module to determine if a URL is valid?

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{HTTP}/ and print "Contains an HTTP URI.\n"; }


Comment on Re: perl module to determine if a URL is valid?
Download Code
Re^2: perl module to determine if a URL is valid?
by Anonymous Monk on Sep 22, 2009 at 15:45 UTC
    You can also use
    $regexp = qr($RE{URI}{HTTP}{-scheme=>qr/https?/}{-keep});

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://796408]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2015-07-04 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls