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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^4: perl challenge 2
by stevieb (Canon) on Dec 16, 2015 at 00:00 UTC
    Read all of my other posts to you. We Perl hackers have laziness as a virtue, but unless you have buckets of cash, we're not doing your work for you. Show your professor your questions here, and see what they say. ...and for the love of all things good, read How do I post a question effectively?. Not doing so after so many times having stating it to you will get you abandoned very quickly.

      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?

        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...)

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

Re^4: perl challenge 2
by GotToBTru (Prior) on Dec 16, 2015 at 16:02 UTC

    We love to help people learn; we are not here to do your teacher's job or your job. If your teacher isn't giving you enough to get started, then your problem is with him. If you aren't willing to try the stuff you've been taught, the problem is you.

    Try something. If it doesn't work, create an example program to show us what you tried, what you thought would happen, what did actually happen (including error messages). Do that enough times, and you'll find you are answering your own questions. Soon enough, you will be able to answer other's questions. And that, my friend, is what this site is really about.

    Dum Spiro Spero
      dogpile--