Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
There's more than one way to do things
 
PerlMonks  

Directory-non-recursion (was Re: Re: Directory Recursion)

by merlyn (Sage)
on Jan 06, 2002 at 00:19 UTC ( [id://136630]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Directory Recursion
in thread Directory Recursion

Heh. That reminds me that I have a column that also does that. Directory "recursion" without recursion.

-- Randal L. Schwartz, Perl hacker

  • Comment on Directory-non-recursion (was Re: Re: Directory Recursion)

Replies are listed 'Best First'.
Re: Directory-non-recursion (was Re: Re: Directory Recursion)
by Haloric (Novice) on Mar 04, 2014 at 10:07 UTC
    I'm a few years late to the party - but you are iterating over an array that you are extending, (@files) not sure what the party line is on this, but it caused me grief. Create a temporary array, then append the two together at the end. Then throw it all away and use File::Find.
      You replied to a wrong node. merlyn does not iterate over an array, he runs while (@array), which is correct.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://136630]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.