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 studying the Monastery: (7)
As of 2016-08-26 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (366 votes). Check out past polls.