sub WriteableDir { my $DIR = shift; if (open(F,">$DIR/tmp.file") ) { close(F); unlink("$DIR/tmp.file"); return 1; }else{ return 0; } }