Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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"; }

Replies are listed 'Best First'.
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});