in reply to To remove duplicate lines and add digits as per loop
It looks like you've copy-and-pasted together code from davido here, myself here, and with $^I from somewhere else (perhaps Duplicate lines with spaces, tabs...). The code you've posted also doesn't compile.
Do you understand what all of this code is supposed to be doing? I suggest you don't start with this fairly complex code (e.g. do you really need $^I and file locking?), but instead start with perlintro and some simple code.
We're happy to help you learn Perl. But please understand that what your post currently looks like is that you've copy&pasted code samples together in hopes that someone else will do your work for you. If that's not the case, please share your own thought process and your own efforts.
|
|---|