Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Answer: How do I test whether or not a file is writable?

by JavaFan (Canon)
on Mar 18, 2010 at 14:34 UTC ( [id://829406]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I test whether or not a file is writable?
in thread How do I test whether or not a file is writable?

There's no point testing for both -f and -w. If the file doesn't exists (or if its existence cannot be determined), -w will return false. And if -w returns true, the file exists.

Replies are listed 'Best First'.
Re^2: Answer: How do I test whether or not a file is writable?
by clinton (Priest) on Mar 18, 2010 at 16:41 UTC
    Yes, but -w would also return true if the file is actually a writeable directory

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-20 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found