in reply to Hash problem

So you want to report the user, session id, and timestamp of each record grouped by user? Could be tricky, since even in your very brief sample data, none of those fields is uniquely occurring. So, let's try listing by user, primarily, and by time, secondarily. Any complete duplicates are not shown; just one instance will be printed. (However, the count is known, if you decide to print that too.)
my %User_Lst; open ACCESS,"< $FileName" or die "Can't open $FileName for read: $!\n" +; while (<ACCESS>) { /:(..:..:..).*USERID=([a-z0-9].+); .*JSESSIONID=[a-z0-9].*?:(.+)/ and $User_Lst{$2}{$1}{$3}++; } close ACCESS; for my $UserID ( sort keys %User_Lst ) { for my $TStamp ( sort keys %{ $User_Lst{$UserID} } ) { for my $session ( sort keys %{ $User_Lst{$UserID}{$TStamp} } ) { printf "Server Name :%s,\t User Name: %s ,\t Time:%s \n", $session, $UserID, $TStamp; } } }