in reply to Creating loop on undefined hash key value
The value at $links{$some_key} cannot both simultaenously be the number one and a subhash reference. I suggest you change it to:$links{$url}{html} = $html; ... $links{$new_url} = 1;
Then when you actually visit the node, change that 0 to a 1, and put the HTML in there.$links{$new_url}{visited} = 0;
However, if all you're writing is a link checker or recursive web walker, you'd be about the 492nd person to do it this month. I suggest you save lots of time and look at WWW::Robot or WWW::SimpleRobot or any of my columns on that subject.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Creating loop on undefined hash key value
by S_Shrum (Pilgrim) on Nov 23, 2002 at 18:29 UTC | |
by theorbtwo (Prior) on Nov 23, 2002 at 18:33 UTC |