#!/usr/bin/perl # testwrite.pl use strict; use Cwd; print "Content-type: text/plain\n\n"; my $cwd = cwd(); if ( open my $fh,'>',$cwd.'/testwrite' ){ print "OK $cwd is writable" } else { print "ERROR $cwd is NOT writable" }