> > #this part is new and confuses myself
> > push (@{$sessionids{$session->{pathname}}},{$session->{id}});
> > push
> > (@{$sessionusers{$session->{pathname}}},{$session->{username}});
>
> Why the braces? You are creating anonymous hashes. Also too many
> unnecessary brackets. Also, given the number of times you refer to
> $session->{pathname}, you could simplify your code by making a local
> copy. Should look something like:
> my $pathname = $session->{pathname};
> push @{$sessionids{$pathname}}, $session->{id};
> push @{$sessionusers{$pathname}}, $session->{username};
I changed that to
$id=$session->{id};
$username=$session->{username};
push (@{$sessionids{$session->{pathname}}},$id);
push (@{$sessionusers{$session->{pathname}}},$username);
and now it works... must have been the braces then? I took that from
examples, but had to replace a few things...
> >
> > next unless $session->{pathname};
>
> Surely the above line should be before the push statements?
no, the upper hashes should always be filled, while that next one only
should be added with new occurences.
Thanks for the help
Lars
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs