New to Perl, what I'm trying to do is print out the unique values for a given LDAP attribute.
1. Does the while portion of this look correct? 2. If so, how do I print out the values of the hash? ...snip... my $iDirLdap = &Common::connectToiDir2("ldap.edu"); my $iDirResult = $iDirLdap->search ( base => "dc=ldap,dc=edu", filter => "EduUserRole=*", attrs => ['EduUserRole'], ); while( my $entry = $iDirResult->pop_entry()) { my @a = $entry->get_value('EduUserRole'); my @result = (); my %seen = (); foreach (@a) { next if ($seen{$_}); $seen{$_} = 1; push (@result, $_); } } What goes here to print out unique values? &Common::disconnectFromiDir($iDirLdap); exit;