|
|
| laziness, impatience, and hubris | |
| 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?? |
|
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||