Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Depth Listing in Directory Traversal (one more stack)

by tye (Cardinal)
on Jul 20, 2004 at 06:36 UTC ( #375832=note: print w/ replies, xml ) Need Help??


in reply to Depth Listing in Directory Traversal

Where you  push @{ $self->{dirs} },... you need to add push @{ $self->{levels} }, 1+$self->{level};. When you shift off of $self->{dirs}, also do $self->{level} = shift @{ $self->{levels} };.

You can do it in more memory-efficient ways but the added complexity seems not worth it.

- tye        


Comment on Re: Depth Listing in Directory Traversal (one more stack)
Select or Download Code
Re^2: Depth Listing in Directory Traversal (one more stack)
by crabbdean (Pilgrim) on Jul 20, 2004 at 13:16 UTC
    tye you are great. :-) Love your work! ++ That worked a treat.

    You know I was part way there in that thinking process, had similar thoughts but hadn't connected the pieces. Appreciate the help.

    Thanks also to hbo that idea would have worked also but I felt this was cleaner.

    Dean
    The Funkster of Mirth
    Programming these days takes more than a lone avenger with a compiler. - sam
    RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-03 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls