>>>>> "Grant" == Grant <[EMAIL PROTECTED]> writes:
Grant> Hello, I need to do some special processing if the domain of a URL Grant> string matches a set of possible values. I'd like to catch http and Grant> https. What is the best way to do that? Keep in mind that www.stonehenge.com can be written as www.stonehenge.%63om. Yes, hex escaping can be used in the URL. But watch this: $ perl -l use URI; my $uri = URI->new("http://www.stonehenge.%63om"); print $uri->host; ^D www.stonehenge.com $ So, you'll definitely want to take ->host from that and do your matches against that, not against the original data. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/