Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2016-12-04 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (68 votes). Check out past polls.