in reply to Re: Log File
in thread Log File

Reading the faq i see that module Log::Dispatch::FileRotate can help me. But I am nt able to know how to use it? I am giving the code i am using presently::

open(LOG,">file.txt") some code print LOG,"message"; some code print LOG,"message"; close(LOG;)

How can i implement the above code through Log::Dispatch::FileRotate to change filename if size exceeds 10 mb?

Replies are listed 'Best First'.
Re^3: Log File
by Anonymous Monk on Oct 15, 2012 at 14:52 UTC
Re^3: Log File
by RedElk (Hermit) on Oct 15, 2012 at 16:57 UTC

    First, install the module from CPAN. Second, declare use of the module in your code (see use) . Third, call the module (as described in the module FAQ) at the desired point in your existing code.

    Additional info about modules can be found here. If you still have questions, consider checking other parts of perlintro as well.