in reply to Script to clean up a log file based on timestamps

Would you be able to help me understand this bit of code? And make it useful for this purpose?

No thanks. Skip that piece of code and read perlintro (and read it well, from the beginning), read when it talks about creating and initializing variables with my, opening files with open/binmode, reading the files in a while loop with readline, print strings to new file handle, and testing strings with m//atch operator in Simple matching/perlrequick

Editing a file is fours steps

And maybe read Path::Tiny if you like convenience methods

Your timestamps do not contain a year ... how will you know what year to start with?

:)

  • Comment on Re: Script to clean up a log file based on timestamps

Replies are listed 'Best First'.
Re^2: Script to clean up a log file based on timestamps
by Anonymous Monk on Oct 29, 2014 at 00:01 UTC