wp.jochen.hayek.name/blog-en

reading a growing file in perl

Approaches:
  • File::Tail (or one of its sisters) is your friend (preferred!)
  • use this (together with sleep(…)) for getting EOF reset: seek(LOG, 0, 1) (if you must stay with vanilla perl)
Wrote my 1st script making use of File::Tail today, a “main log file” referring to short other log files. Now I read all of them using File::Tail. Looks good and rather versatile.
Exit mobile version