Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

by tye (Sage)
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        

Replies are listed 'Best First'.
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.

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://375832]
[choroba]: ah, these

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2018-06-19 12:48 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.