S_Shrum has asked for the wisdom of the Perl Monks concerning the following question:
[LOOP NEEDED HERE] { ... $links{$url}{html} = $html; ... $links{$new_url} = 1; ... $links{$url}{visited} = 1; ... }
Note from my somewhat cryptic snippet above, that new $links keys can/will be created but they will not have a defined (yet) {visited} key. I guess this is sort of what is called a recursive loop? As new items are added, I need to make sure that those items are also dealt with.
What I'm looking for is some sort of loop syntax that will evaluate the $links hash entries to see whether or not the {visited} key is not defined > I can then "visit" the $url and then set $links{$url}{visited} = 1.
TIA
======================
Sean Shrum
http://www.shrum.net
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating loop on undefined hash key value
by Courage (Parson) on Nov 23, 2002 at 09:54 UTC | |
by S_Shrum (Pilgrim) on Nov 24, 2002 at 04:49 UTC | |
by Courage (Parson) on Nov 24, 2002 at 08:19 UTC | |
|
•Re: Creating loop on undefined hash key value
by merlyn (Sage) on Nov 23, 2002 at 13:18 UTC | |
by S_Shrum (Pilgrim) on Nov 23, 2002 at 18:29 UTC | |
by theorbtwo (Prior) on Nov 23, 2002 at 18:33 UTC | |
|
Re: Creating loop on undefined hash key value
by BrowserUk (Patriarch) on Nov 24, 2002 at 07:27 UTC |