# ensure the file exists open FILE, ">testfile.log" || die "Unable to create file: $!"; close FILE; # test 1 if (! -f ">testfile.log") { print STDERR "Not a file >>.\n"; exit; } print "I shouldn't be here.\n"; exit; __END__ #### Not a file <. #### Not a file >>.