in reply to Re: Generating Random Filenames
in thread Generating Random Filenames

This code creates a race condition. Between the time the -e test is run, and the file is open, that file could have been created. It would be better to use sysopen with appropriate flags (e.g. you can have it open for writing but fail if the file already exists), or even better to use File::Temp, which does that for you.