Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

•Re: is there something wrong with this code?

by merlyn (Sage)
on May 18, 2002 at 21:22 UTC ( [id://167560]=note: print w/replies, xml ) Need Help??


in reply to is there something wrong with this code?

There's something wrong with the code in principle: as in, hit counters are bad -- you should be grepping the logs instead, and even those are wrong because of proxies and caching.

But specifically, this code:

open( LOG, ">/home/exposu/logs/web_access.log.txt" ) || die "$!\n";
makes this a "one hit wonder". {grin} Each new hit overwrites the previous file instead of appending it. Change your > to a >> there.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: is there something wrong with this code?
by emcb (Beadle) on May 18, 2002 at 21:33 UTC
    I realiased this and hit back to change it and re-submit after preview, but it did'nt work. And im ashamed that i left out the '-w'! Sorry the open has the '>>' but i cant edit it now, or can i?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://167560]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-24 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found