Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

chaoticset
  (email not shown publicly)
http://chaoticset.perlmonk.org/
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [perlmonks.org], and here [javajunkies.org] too, I ramble randomly in my philosophical blog [blogspot.com] and my other blog [blogspot.com]. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Thursday August 22, 2002
02:38 AM

GOOOOOAAAAAAALLLL!

[ #7235 ]
It works. The function get_chain($start_url, $target_url); will return an array of URLs if nothing fails in the function. It stops at a depth of fifty links, currently. (I'll be able to fine tune that later, and I've already been thinking about making the depth switchable on the function call, like get_chain($start_url, $target_url, $search_depth); .)

It's also with the caveat that -- roughly nine times out of ten -- my current method for choosing which link to traverse next (pseudorandom selection) will result in bad links or hitting the maximum depth of searches instead of successfully locating the target. Other than the fact that it fails 90% of the time, it WORKS!

Maybe I shouldn't be this enthused.

Anyway, I hope to work on it a little bit tomorrow. Everything's in place to help make that random traversal a little smarter, I just have to write some rules. Should be easy as pie.

Of course, I thought I'd have this thing written and working by now, too...hm. :\

Anyway, here's the output from my test script the first time it ran without failure and lots of unit tests everywhere.

The first link is http://use.perl.org/~chaoticset/
which then links to http://5050.blogspot.com/
which, lastly, links to http://use.perl.org/.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.