> I keep feeling I should learn more before I post here (lest I 
> look like a lazy 
> idiot who can't RTFM), but I'm getting too old to wait!
> Anyway, first post:
> Surely there's a module (or many) with a method to parse 
> URL's down to TLD. I 
> just can't find nice lists of them. I need to see if some 
> files came from the 
> same host. Here's what I'm doing now (just to show I'm 
> writing _some_ code):
> 
> my $link = $result->{URL};
> my $slink = substr($link, 10, 7);
> if($slink eq $temp){
> ...do stuff...
> $temp=$slink
> }
> 
> No. Look away. It's hideous.

I have a module I'm putting on cpan soon that has a  grabdomain function.
Part of the trouble is the country part, to illustrate:
        domain.com and domain.com.uk are both the "main domain". so my function takes 
        into account those and lets you add and remove which far right \w+ would be 
two or three sections.
        Then each section has to be properly formatted also. RFC can get sticky!

        Keep your eye out on cpan for the SimpleMood module. It will have 
        lots of handy things to simplyify development.
 
> (But it usually works).
> OK, obviously I haven't gotten regexes down (or gotten to 
> their chapter at 
> all). My question is: how can I find (not just this but any) methods 
> available on cpan? Must I muck through google every time I want to 
> "q=learn+some+new+damn+perl&btnG=Google+Search"? It's such a 
> wasteland of 
> usenet postings from 1995!

http://search.cpan.org
perldoc -h

HTH

Dmuey
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to