Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Is readdir ever deterministic?

by grinder (Bishop)
on Sep 17, 2001 at 18:39 UTC ( #112867=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      opendir(DIR, "/users/foo/");
      @bar = readdir(DIR);
      closedir(DIR);
    
      for (1..2) {shift @bar;} #get rid of '.' and '..'
    
  2. or download this
      while( defined( my $file = readdir(DIR) )) {
        next if $file eq '.' or $file eq '..';
        munge($file);
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://112867]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2015-07-04 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls