Your biggest problem is not the logic of the problem, but the logic of what you want to do.

You are data mining over HTTP log files. HTTP is essentially a stateless, sessionless protocol. Yet you want to measure the length of "sessions" somehow.

You're up for a failure. You want to measure something that isn't really there. And it isn't just "quitting browsing" that will spoil your day. When I hit "preview" in a minute, it's likely that it takes a while before the request goes to perlmonks, perlmonks does what it wants to do, the request is back, the ad has been fetched and the page is displayed. I'll switch to IRC, p5p or do some actual work before I return my attention to the preview page. There might be 20 minutes between hitting 'preview' and 'submit' on the next page. Did I "browse" for 20 minutes? No, I probably won't even spend 20 seconds.

Oh, did I mention that the user name for the proxy I'm using is shared with a whole bunch of people, and that we're rotating between several proxies? That would really screw up your analysis, wouldn't it? ;-)

My suggestion: give up on the idea. It's utterly useless, the data you have can't measure what you want to measure, and what you want to measure doesn't have much connection to what you want to know anyway.

Abigail


In reply to Re: Perl Programming Logic by Abigail-II
in thread Perl Programming Logic by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.