rahul02 has asked for the wisdom of the Perl Monks concerning the following question:

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

Replies are listed 'Best First'.
Re: Report filtering
by kcott (Archbishop) on Feb 18, 2014 at 06:17 UTC
Re: Report filtering
by davido (Cardinal) on Feb 18, 2014 at 05:57 UTC

    It is difficult suggesting the steps you need to take when we dont know if learning to program, learning Perl, and learning to use Google are steps that you have already taken, or not. Where do you want us to start? We might be able to focus our assistance better if you would show what you've tried,and explain what your own research has led you to understand.


    Dave

Re: Report filtering
by Laurent_R (Canon) on Feb 18, 2014 at 07:14 UTC
    Yeah, the question is far to vague. The answer might be as short as:
    while (<$LOG_FILE>) { $error_count++ if /error/i; }
    if assuming you know how to do the rest and understand how to use the above. Or it might need much more information if you don't know or understand these things. And we don't know whether you know these things.
Re: Report filtering
by karlgoethebier (Abbot) on Feb 18, 2014 at 08:25 UTC
Re: Report filtering
by Anonymous Monk on Feb 18, 2014 at 10:39 UTC
    Here's how I'd do it in pseudo-code.
    for each line in log file { detect an error count of whole errors ++; } print result in csv file
Re: Report filtering
by wjw (Priest) on Feb 19, 2014 at 16:41 UTC
    The previous responders are spot on about this question and how it is posted.

    I think however that what you need to do is sit down and design your solution.

    Take all that you know about what you want, then ask yourself "what do I not know?".

    Research what you don't know, and use what you find.

    When you run into something that you simply can't do... then go to the "how do I ask questions" pointed to by others previously and use that to frame the question up.

    I think the problem your having is that you have not put in enough effort to know what questions you have.

    You know you want to use Perl(or you would not have posted here), and you know you want .csv as output. What do you know about the log files? Are they local? Are they text files? Do you have access to them? etc...?

    Hope that is helpful.

    ...the majority is always wrong, and always the last to know about it...
    Insanity: Doing the same thing over and over again and expecting different results.