Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Opening a Directory

by FoxtrotUniform (Prior)
on Jan 19, 2002 at 01:48 UTC ( [id://139961]=note: print w/replies, xml ) Need Help??


in reply to Opening a Directory

Can you show me how to validate the existence of a directory?

You want the file test operators, specifically -d.

If the directory name has a space in between, what should I do?

Nothing special, as long as you have the whole dir name instead of just the first word.

And how to capture all the files under a directory?

opendir, readdir, closedir.

And God bless all Monks!

Which one?

--
:wq

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-05-19 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found