Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

I don't use glob, I use readdir

by Corion (Pope)
on May 29, 2000 at 13:52 UTC ( #15272=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DIR = opendir( "$area" ) or die "Can't read '$area' : $!";
      @files = readdir( DIR ) or die "Error reading from '$area' : $!";
      closedir( DIR ); # Don't care about errors here
    
  2. or download this
      while ($file = readdir(DIR)) {
        ... do your stuff to $file ...
      }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2015-07-04 18:23 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 (60 votes), past polls