in reply to slighly newbish question
If the other program is not flushing its buffer correctly with every new element then you may be getting strange side effects.
$|=1; switches off any write buffering in perl.
Also without locking the file if the other program appends a line while you are trying to truncate down to 20 lines then that update will be lost.
Hope this helps
UnderMine
|
|---|