Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: directory or file?

by hiseldl (Priest)
on Apr 16, 2003 at 13:07 UTC ( #250882=note: print w/ replies, xml ) Need Help??


in reply to directory or file?

my $path = "/path/to/file_or_dir"; if (-f $path) { # this is a file } if (-d $path) { # this is a directory }

--
hiseldl
What time is it? It's Camel Time!


Comment on Re: directory or file?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (15)
As of 2015-07-31 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls