in reply to Checking for directory write permissions

You can use -w on directories.

But do you really need to check that? Just check whether open fails or not by examing $!:

$ perl -le 'open(FILE, ">", "nowrite/newfile") > or die("Unable to create file: $!\n")' Unable to create file: Permission denied

Update: I originally checked if the dir was readable. Fixed.