in reply to Re^3: Help with Snort and File::Tail
in thread Help with Snort and File::Tail

Ahhh. I see that was very helpful. Thank you. Would this add to the end of an output file if at the end of my sub I just do like "print WRITEFILE xxxx"? When I ran the perl script on the same document twice (before I implemented this File::Tail stuff) the 2nd time it overwrote the first part in WRITEFILE. How can I insure every new alert gets added to the end of the output file rather than the most recent alert overwriting the older ones?

Replies are listed 'Best First'.
Re^5: Help with Snort and File::Tail
by runrig (Abbot) on Jun 22, 2011 at 21:21 UTC
    Perhaps you need to open the file in append mode:
    open(my $fh, ">>", $filename) or die "Err opening $filename: $!";