in reply to Optimize file renaming.

I'm surprised that no one has asked _why_ you are interested in optimizing this task. Do you expect to do it a lot? Do you expect to do it on many more than 350 files in the future? Is it actually a good use of your time to make this faster?

That said, the revised version has the virtue of being easier to understand than the original, so that's good. Personally, though, I would do away with the s///e business and just assign the result of sprintf to a temporary variable.

Replies are listed 'Best First'.
Re^2: Optimize file renaming.
by omega_monk (Scribe) on May 26, 2005 at 19:28 UTC
    I did mention that I wanted to optimize it for the sake of learning. ;)