Show us the actual code you tried and tell us what issue you saw. $counter = 1 & ++$counter is rather unlikely code and probably doesn't do anything like what you expect, although it's hard to tell what you expect.
Don't use the C style for loop. Instead use:
for my $counter (1 .. 9) { ... }
which is much clearer and a lot harder to get wrong.
In reply to Re^5: regex renaming with existing files
by GrandFather
in thread regex renaming with existing files
by ArifS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |