I'm trying to find or create a Perl script that:
Checks for and creates these files:
notes
notes.1
notes.2
notes.3
notes.4
The first represents the current log file and the others are older versions. Each time the script runs it would check for the existence of notes.3 and, if it exists, move it to notes.4. Then is should check for notes.2 and move it to notes.3 and so on, until notes is moved to notes.1.
I've looked on the net already, but they're just too complex and try to do too much compared to my requirements.
Does anyone know of a script that does this, or do you have any code that could be adapted easily?
Thanks!