Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 perusing the Monastery: (8)
As of 2016-06-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.