checks Perl syntax before allowing file write