in reply to Re: Help Required
in thread Help Required

Hi,

No I've not written any code as I've very limited knowledge of a Perl. Basically, I'm a DBA, but would like to learn and start writing some script which would help in my env.

About your query, the log ( access ) gets rotated in itself, so no need to set a time period.

For a day the access log is usually 20 mbs, however, i would like to put sometime to record previous run, that way the script would be less resource intensive or would be quicker.

Thanks.

Replies are listed 'Best First'.
Re^3: Help Required
by MishaMoose (Scribe) on Dec 20, 2010 at 16:06 UTC

    Given your desire to acquire PERL knowledge, I would recommend you use this as your learning project. It is relatively straightforward and touches on some of the important basics.

    Approach it iteratively. Write a program that simple reads in the file line by line and prints it back out ….. Examples can be found in any good perl book such as ‘Learning Perl’ Chapter 6.1

    Then see if you can determine which lines contain things that interest you. Read up on the match operator and basic regular expressions, and hashes. Try out what you learn in your code. If you encounter problems come back and post your code and ask questions about it. It will be much easier for the Monks to answer those questions than to write the code for you. Which is the only way to answer you question at this point.

    Get that far and I expect you will find a number of very competent folks who will be happy to assist

    Every journey starts with the first step 8^)

    I wish you a good journey and hope to provide some assistance further down the road.

    Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance
      Perl is the language, perl is the executable. "PERL" doesn't exist.

      In before...: It's a bacronym.

        sorry for the offense. It was however, intended for emphasis. Thank you for your kind correction of my ignornce

        Misha/Michael - Russian student, grognard, bemused observer of humanity and self professed programmer with delusions of relevance