in reply to Re: Re: File deletion
in thread File deletion

I think it would be a whole lot easier to get a hash of the files in the directory. Then delete the files to be saved out of the hash? And then unlink all files in the hash? ex.
my %trash; @trash{@file_list} = " "; delete @trash{@saved_files}; foreach $file (keys %trash) { unlink $file; }
Tell me if I am wrong but woulnt it be a bit faster because you are not doing a conditional check in the loop?
Three