Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Imploding URLs

by dReKurCe (Scribe)
on Jun 11, 2005 at 09:33 UTC ( [id://465778]=note: print w/replies, xml ) Need Help??


in reply to Imploding URLs


I havn't come across a post that made laugh as hard is this one in a while (mostly because I've been away).Once I figured out what was being sought I neerly dove in to the regexing I think that the ranking algorithm holds the intrigue.I'm not sure if I've made the code more or less accessable.Anyway it made me think.
#! /usr/bin/perl # Authored By :DReKurCe # Fri Jun 10 21:10:33 EDT 2005 use warnings; use strict; my @mostcommon=qw(www com org edu ); my @urlist =qw ( www.to2600.org www.perlmonks.org www.darkphiber.ca); graburl(@urlist); sub graburl { my @urlist=@_; my $listlen=@urlist; foreach my $url(@urlist){; urlcom(@mostcommon,$url); } } sub urlcom{ my $url; (@mostcommon,$url)=@_; for my $match0(@mostcommon){ my @atomize=split (//,$url); foreach $atom(@atomize){ if (<masterful regex>)rank($url,1) else(<masterful regex>)rank($url,2) . . . } } } sub rank{ <impliment ranking behaviour for url> }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found