Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 lurking in the Monastery: (10)
As of 2014-10-26 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (151 votes), past polls