Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Hash table checker doesnt work

by ferreira (Chaplain)
on Apr 10, 2007 at 10:41 UTC ( [id://609105]=note: print w/replies, xml ) Need Help??


in reply to Hash table checker doesnt work

If you're having trouble getting the recursion right, you must peek inside the structures that control your recursion, like %parent in this case. You could use something like

use Data::Dumper; ... print Dumper \%parent;
But I don't see any code that adds entries to this hash. How recursion is being controlled if every time a URL passes through the code, it meets (apparently) the same conditions again? I think that self-referencing pages should be quite common.

As an aside note, most often you should not use subroutine calling like &passing(). Prefer plain passing().

Replies are listed 'Best First'.
Re^2: Hash table checker doesnt work
by hodashirzad (Novice) on Apr 10, 2007 at 10:49 UTC
    Sorry that was a typo mistake but i mananged to get it working now by just having the $i start from 1 instead of 0 but I dont know why when I start the $i from 0 it ignores the

    if(!$parent{$urls})

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-16 22:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found