Yes, it's kind of weird, but it's a work in progress. The secondary loop and the part about compressed files were shoehorned in there to deal with problems removing temporary directories. You're right that I should clean it up and use a different array variable other than @_, even if just for readability.