Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Is readdir ever deterministic?

by merlyn (Sage)
on Sep 18, 2001 at 01:25 UTC ( #112972=note: print w/ replies, xml ) Need Help??


in reply to Re: Is readdir ever deterministic?
in thread Is readdir ever deterministic?

Well, being truly defensive, you should have written:

foreach my $file ( grep { !/\A\.{1,2}\z/ } readdir DIR ) { munge($file); }
Or else the day someone creates a file named dot-newline or dotdot-newline, you'll be very angry.

-- Randal L. Schwartz, Perl hacker


Comment on Re: Re: Is readdir ever deterministic?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-12-28 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls