Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 romping around the Monastery: (10)
As of 2014-11-27 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (184 votes), past polls