in reply to Re^2: Rename FILE to nnn-FILE
in thread Rename FILE to nnn-FILE

Ooops, somehow I omitted this from the version I posted. Just make this change:

my $i; # change to my $i = '000';