[wplug] Perl script - need help

Christopher DeMarco demarco at maya.com
Wed Jan 23 14:56:35 EST 2008


On Wed, Jan 23, 2008 at 02:36:54PM -0500, Zach wrote:

> The ip and browser type etc are printed out in the browser on one line
> with no newline yet I included "\n\n"

\n != <br />


> In my log file the ip is printed on first line, then newline, and on
> 3rd line is the browser type etc.  This is all good, except
> each time the script is run it over-writes the previous information.
> So instead of making lines 4,5,6 it just over-writes lines 1,2,3

[snip]

> $fp = open (LOG, ">$log_file"); # opens the log file for writing

``>'' truncates and opens for writing, IIRC you want ``>>''.


-- 
Christopher DeMarco <demarco at maya.com>
Information Technology Supervisor
MAYA Group
+1-412-488-2900


More information about the wplug mailing list