in reply to How do I test whether a file has write permission?

The -w test will do:
if (-w FILEHANDLE) { print "It's writeable by my effective uid or gid!\n"; }
For more information, see -X (or perldoc -f -X).