in reply to Re: Clean exit using File::Tail
in thread Clean exit using File::Tail

Cool, but how do I tell File::Tail to cleanup, ie read the remaining lines before exiting?

Replies are listed 'Best First'.
Re: Re: Re: Clean exit using File::Tail
by perigeeV (Hermit) on May 16, 2001 at 03:28 UTC

    Looking at the docs for File::Tail I might recommend you upgrade to version .98 if you have .60.

    It appears that you could add the reset_tail=>0 parameter to the 'new' method, then close and reopen the file causing the mod to immediately reread the file. Also you could brutishly set maxinterval very low.
    Untested, though.

Re: Re: Re: Clean exit using File::Tail
by isotope (Deacon) on May 16, 2001 at 03:24 UTC
    What happens if your QuitHandler calls exit (and/or your File::Tail object goes out of scope)?
    Update: You might also consider calling the nowait method.

    --isotope
    http://www.skylab.org/~isotope/