in reply to Re: About BLOCK variables
in thread About BLOCK variables

Actually I don't think 'isa' is an issue. The structures are generated by the CPAN LDAP modules (as are the methods for accessing it) and the snippet is pretty close to the Pod examples. But since I didn't include the actual setup calls to the LDAP query, it probably made it difficult to tell what's going on. Sorry, it didn't seem relevant to me at the time the post was formulated.

I assume you made a cut/paste error for the second for loop. The first line is redundant since the second assignment doesn't include the required conditional test for definedness. It also omits the get method so you're actually assigning the same value(s) to each of the different @var values of each $uid instance. E.g.:

$uids{$uid}{mail} = $uids{$uid}{cn} = ${$uid}[0]
which shouldn't be the case.