Slash Boxes
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)

  (email not shown publicly)
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 [], and here [] too, I ramble randomly in my philosophical blog [] and my other blog []. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Thursday August 22, 2002
02:38 AM


[ #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, :\

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
which then links to
which, lastly, links to

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