in reply to Re^2: Renaming files sequentially into directory
in thread Renaming files sequentially into directory

This is a new feature - there was no mention of it in your original post. So, instead of re-engineering the solution already provided, you can just populate your @renamefiles array with a fresh glob after the renames have completed.