Problem
I just accidently clobbered a file I worked hours to code (luckily I have two backups, one on my computer and another on a web server, and a hard copy).
Question
When creating a file through perl, is there a way to check if a file by that name already exists, and complain if it does exist.
I have an idea, but I am looking for a quick solution. I think I could pack some code in that opens the current directory, and tests the given name against all of the files in the directory.
Is there a quicker fix than me having to kluge that in.
2005-11-06 Retitled by planetscape, as per Monastery guidelines
Original title: 'Safe File Hadling'