in reply to Re^2: filesystems & Perl (updated!)
in thread filesystems & Perl

for point 2, consider opening a file as "./name.tmp", then write all the lines to it, then close the file so all content gets flushed to disk, and THEN rename it to your valid extension, like .dat with rename $temporal_name, $realfile_name; Keeps operations pseudo-atomic for your readdir's.