Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Recursive function in perl

by targetsmart (Curate)
on Jun 18, 2009 at 08:42 UTC ( #772675=note: print w/replies, xml ) Need Help??

in reply to Recursive function in perl

I am having a number of links in a hierarchial order
IMO if you have it in a Hash of hashes (see perldsc), then the task becomes easy, just walk through the keys and respective values and call appropriate functions, maintain a array and push the values that you are walking through from particular key to print the depth(full link path).

How can I do it with recursion?
Why do you want to specifically go for recursion??, can't you achieve using simple ways unless you want to do something very purposeful inside that depth of link.

-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://772675]
[marto]: good morning all
[Corion]: Hi marto!
[Corion]: The fun show at $work continues, as The Big Project is now in its second week of frantic live-bugfixing and weekend releases where nobody knows what went live. Nothing has been tested anyway.
erix mutters cantankerously under his breath
Corion watches from the sidelines. Or rather, from behind, as my system only gets output from that process and my programs adhere strictly to the GIGO design principle.
[erix]: ah, that's nice to hear Corion :)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-03-28 08:51 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (328 votes). Check out past polls.