Hello, I'm running into a wall when trying to figure out the Perl code to complete the following.
I need run a perl script that opens up a server log file (lets call this file SERVER_LOG.txt, located at c:\logs) and then copy the last 11 lines of that file and then print those 11 lines into a new log file (lets call it FINAL_LOG.txt)
I can open a new log file and write to it, but my problem is opening the current log file and copying the last 11 lines. I would greatly appreciate any code that might help me complete this!! Thank you for your time and help!
I need run a perl script that opens up a server log file (lets call this file SERVER_LOG.txt, located at c:\logs) and then copy the last 11 lines of that file and then print those 11 lines into a new log file (lets call it FINAL_LOG.txt)
I can open a new log file and write to it, but my problem is opening the current log file and copying the last 11 lines. I would greatly appreciate any code that might help me complete this!! Thank you for your time and help!
Comment