if (!(-w FILE)) { print "Content-type: text/plain\n\n"; print "Error: This file does not have write permission!\n"; exit; }