in reply to Re: Re: Re: Getting IP from URL
in thread Getting IP from URL
use URI; my $url = 'http://foo.bar.com'; my $uri = new URI($url); if( $uri->host =~ /[a-zA-Z\-]/ ) { # or /[^\d\.]/ # it's an IP dag-nabbit }
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Getting IP from URL
by rob_au (Abbot) on Oct 06, 2002 at 10:51 UTC |