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

Re: "-e" and "-d" switches

by ambs (Pilgrim)
on Mar 25, 2005 at 18:34 UTC ( #442389=note: print w/replies, xml ) Need Help??


in reply to "-e" and "-d" switches

The '-x' switches (perldoc -f -x) test various file properties.

In your case, -d "filename" tests if "filename" is a directory. -e "filename" just checks if it exists. For example, -f "filename" will tell you if the file is a plainfile.

You can use these switches to get other information from files like age or last change.

Alberto Simões

Python's syntax succeeds in combining the mistakes of Lisp and Fortran. I do not contrue that as progress.

-- Larry Wall

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2021-10-27 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (91 votes). Check out past polls.

    Notices?