in reply to Use of freed value in iteration

That seems to be a bug on one of the modules you are using, wrongly handling reference counts on the values it returns.

Where does $system come from?

Can you reproduce the problem without the foreach my $uid (...) loop?

Replies are listed 'Best First'.
Re^2: Use of freed value in iteration
by js1 (Monk) on Sep 08, 2005 at 14:42 UTC
    $systems is a hash of hashes i.e. $system{$sys}{$uid} where $sys is a system for example, email and $uid is a userid on that system. The module here is Mozilla::LDAP.
      Could you show us the code where $system is populated?

      Also, use Devel::Peek to print the internals of some of its values and let us see the output. For instance:

      use Devel::Peek; ... $system{some_host}{some_user} = $ldap->whatever(); Dump($system{some_host}{some_user});