Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
[erix]: who can explain to me why Primary Key Fragmentation (whatever it may be) might be a problem?
[jedikaiti]: Pretty!
[erix]: ( TBH, I think it's a load of bull -- but maybe I'm mistaken )
[erix]: Hey that's Hungary - wave down ambrus and tell him to reboot his systems!
[choroba]: it might be a problem if you expect to reach the maximal possible value soon without squashing the ids
[erix]: that's really impossible with bigint
[erix]: and the site is still only 'hopefully' active :)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2017-06-23 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (550 votes). Check out past polls.