Oops, I am wrong -- I did not read carefully enough to see you wrote
"Session_OnStart" rather than "Script_OnStart", which I was thinking.
Sorry about that.

Broc


 > Broc--
 >      Thanks for the useful code.  But I thought since it was placed in the
 > Session_OnStart sub, that it would create an empty array reference for each
 > new session, not script.  Is this not the case?  Now Script_OnStart I
 > understand happens each time a script runs, but I thought the former sub was
 > independent of how many scripts run in a given session.  Even though I am
 > inquisitive to the answer of this question, the code you supplied may very
 > well be part of the answer I implement.
 > 
 > Robert--
 >      Thanks so much for clearing that up for me.  I had no idea how Session
 > handled stuff internally, so it was easy for me to fall into that trap.
 > Your example helped me tremendously.
 > 
 > 
 > Regards,
 > Thom
 > 
 > -----Original Message-----
 > From: K Broc Seib [mailto:bseib@;icd.ics.purdue.edu]
 > Sent: Wednesday, October 23, 2002 12:51 PM
 > To: Thom Crane
 > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 > Subject: Re: Tracking Visitors
 > 
 > 
 > [...]
 > 
 >  >   Here is an example of my global.asa and what I am trying to do in my
 >  > script:
 >  >
 >  >
 >  > #global.asa#
 >  >
 >  > sub Session_OnStart{
 >  >   $Session->{'history'} = [];
 >  > }
 > 
 > [...]
 > 
 > This code will assign an empty, anonymous array to $Session->{'history'}
 > each time your page loads, thus clearing it out.
 > 
 > You might create subs that check for it to be undef at either "get" or
 > "put" times....
 > 
 > sub get_history {
 >      my $list_ref = $Session->{'history'};
 >      $list_ref = [] unless $list_ref;
 >      return $list_ref;
 > }
 > 
 > sub put_history {
 >      my $list_ref = shift;
 >      $list_ref = [] unless $list_ref;
 >      $Session->{'history'} = $list_ref;
 > }
 > 
 > Broc
 > 
 > 
 > 
 > ---------------------------------------------------------------------
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to