in reply to sequencial file naming
We do this sort of thing a lot at work for surveys that need to be in text format so the various peopel that want to read them can.
However, we occassional delete files as well that were either tests, or smart-@$$ responces. So to keep track of the files that have been deleted i load the directory, knock off the "." and ".." files and iterate through looking for the first avialable slot.
foreach (@files) {
if ($_ == $last+1) {
open( ... );
}
$last = $_;
}
thats minus error checking, etc .. but its the jist of
it.
just make sure you check for race conditions (as mentioned above), and iterate to the next one if needed.
Mbond.