Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Unable to read files from a directory

by Marshall (Canon)
on May 14, 2009 at 03:29 UTC ( [id://763984]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    opendir (DIR, "C:/Perl/bin/Anti") or die "Couldnt open directory: $!";
    @files = readdir DIR;
    closedir (DIR);
    
  2. or download this
    foreach $file (@files)
    {
      print "$file\n"; #just to make sure this looks right
    }
    
  3. or download this
    @files = grep {"$path/$_" -D }readdir DIR;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found