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

Thanks hippo for looking at this.

 push (@renamefiles, $outfile);

Indeed I can see the files renamed now, but 'OrderID.master' file is skipped, I need this file also in my @renamefiles array and name 'OrderID.master'should remain as is

Also, Instead of pushing the files to @renamefiles , can I do this change in same array @files and check the file name changed in @files array

Thanks again for your help.

Replies are listed 'Best First'.
Re^3: Renaming files sequentially into directory
by hippo (Archbishop) on Sep 19, 2018 at 15:13 UTC

    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.