Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: testing files for valid content

by toolic (Bishop)
on Apr 23, 2009 at 20:30 UTC ( [id://759652]=note: print w/replies, xml ) Need Help??


in reply to Re: testing files for valid content
in thread testing files for valid content

Good advice.

And if files are all that are needed (no directories), why not filter out all directories, not just those 2 special ones?

my @files = grep {-f "$dir/$_"} readdir(DIR);

where $dir is the directory path which DIR points to.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2024-04-23 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found