Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: help please

by Revelation (Deacon)
on Mar 26, 2002 at 01:58 UTC ( #154300=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( -d $dirname)
    {
    ...
    
    blah blah blah blah blah
    
  2. or download this
    opendir(DIR, $dirname) || die "can't opendir $dirname: $!";
    my @directory = readdir(DIR);
    my @filenames = grep { -f "$dirname/$_" } @directory;  # Either use th
    +e array @directory, or rewinddir(DIR) here, and grep readdir(DIR) twi
    +ce.
    my @directories = grep {-d "$some_dir/$_" &&  !/^\.$/ && !/^\..$/} @di
    +rectory;
    closedir DIR;  
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://154300]
help
Chatterbox?
and the leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2016-12-11 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.