in reply to Creating files

If you want to check whether the file already exists before you clobber it, then use the -e test thusly:
$name = "filename"; if (-e $name) { print "File $name already exists.\n"; } else { do stuff; }