in reply to Renaming multiple files with unique identifiers

No need to declare that variable; just use the arrays. Maybe you're looking for this (untested):
use warnings; use strict; use diagnostics; use File::Copy; # Set up arrays with original name and new name with unique ISBN my @IDI_name = ('I:\Production\TEST\P001.txt', 'I:\Production\TEST\P00 +2.txt'); my @PLL_name = ('I:\Production\TEST\ISBN_Text.txt', 'I:\Production\TES +T\ISBN2_Text.txt'); # Walk through array and copy with new filename for my $i (0 .. $#IDI_name) { copy($IDI_name[$i], $PLL_name[$i]); }

Replies are listed 'Best First'.
Re^2: Renaming multiple files with unique identifiers
by reedkm (Initiate) on Aug 26, 2013 at 20:56 UTC

    Thank you, this does work as well. Much appreciated.