#!/usr/local/bin/perl if (-e "outfile") { if (!(-w "outfile")) { die ("Missing write permission for outfile.\n"); } if (!(-z "outfile")) { die ("File outfile is non-empty.\n"); } }