in reply to Re^4: perl challenge 2
in thread Reaped: perl challenge 2

ok i will try to read that thing but can you give me a hint at least on how to start i didn't say give me an answer to the problem so i can copy and paste i know how to write some of the code i just need help with analyzing the log files?

Replies are listed 'Best First'.
Re^6: perl challenge 2
by FreeBeerReekingMonk (Deacon) on Dec 16, 2015 at 01:00 UTC

    Well, you need to have a High Level design, which has all requirements and constraints, then you write the detailed design, which in your case could be pseudo code.
    Once you get stranded on "how do I loop in perl", "how do I read parameters in perl", "how do I highlight in colour in perl"... then post your question. I'll be happy to help.

    So, these are the important things to think about before you start coding (the coding starts in your head):
    what is the format of the logfile?
    WHEN is the line important to show? (how are you going to set up your regular expressions?)
    Do you hardcode the logfilename in the program or do you accept it as a parameter? Do you accept multiple parameters?
    What do you do when the file does not exist?
    What do you do when the file is not readable to you? (due to permissions)
    What do you do if the file is binary, and the lines are gibberish?
    What do you do when the logfile is on an share and it takes too long to read? (being homework, don't worry about this one... timeouts, signal traps and such...)

Re^6: perl challenge 2
by Anonymous Monk on Dec 16, 2015 at 01:18 UTC

    Would you care to make a guess, would be the first step in analyzing the log files?