CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [rdugar] Reading directory as per regex: Edit Log



wickedxter
User

Nov 8, 2011, 3:04 AM


Views: 1354
Re: [rdugar] Reading directory as per regex

are you reading the dir one at a time? b/c if not you might want to b/c slurping all that will consume a lot of memory and can slow the process once memory is low.


Code
 
opendir DIR, 'dir/to/somewhere/';
while(my $contents = readdir(<DIR>)){
#make sure its a file or folder
}
closedir(DIR);



(This post was edited by wickedxter on Nov 8, 2011, 3:08 AM)


Edit Log:
Post edited by wickedxter (User) on Nov 8, 2011, 3:08 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives