Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
during the reading of the session logs Isub make_session { my ($u,$a,$s)=@_; %session_hash={ user=>$u, dept=>$a }; $s=\%session_hash; }
&make_session($user,$dept,$sid);
open (HTTP,$access_log)||die ("unable to open $access_log $!\n"); while (my $line2=<HTTP>) { chomp; my @access_fields = split /\s/, $line2; my $session=@access_fields[6]; y $session=substr($session,(index($session,"?")+12),(index +($session,"|")-1)-(index($session,"?")+12) ); if (exists($$session_id{'user_id'})) { print "match found\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash referencing...best approach?
by Roy Johnson (Monsignor) on Nov 24, 2003 at 20:36 UTC | |
by Anonymous Monk on Nov 24, 2003 at 21:32 UTC | |
by Roy Johnson (Monsignor) on Nov 24, 2003 at 22:08 UTC | |
by Anonymous Monk on Nov 25, 2003 at 00:06 UTC | |
by Roy Johnson (Monsignor) on Nov 25, 2003 at 02:51 UTC | |
by Roger (Parson) on Nov 25, 2003 at 00:25 UTC | |
|
Re: hash referencing...best approach?
by tcf22 (Priest) on Nov 24, 2003 at 20:04 UTC |