Hey all, I am using the perl-ldap module (to access MS AD, not that that matters to this question though :-).
My problem is I don't understand part of the example code - it all works just fine, but using the "as_struct" method, I need to just display the "cn" attribute (I need to write the attributes in a specific order, so have to be able to write just one of the returned list - I can change what is returned with no problem). The code I am looking at is here < http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP/Examples.pod#PROCESSING_Displaying_SEARCH_Results > and the specific part is foreach $attrName (@arrayOfAttrs) { # skip any binary data: yuck! next if ( $attrName =~ /;binary$/ ); # get the attribute value (pointer) using the # attribute name as the hash my $attrVal = @$valref{$attrName} ; print "\t $attrName: @$attrVal \n"; } I was thinking (and the documents say) these are references, but I have had a hard time getting my head around references... I have tried adding this print @$valref{cn}; but all it prints is ARRAY(0x25d9ec4) and I want it to print the value of "cn" which is Musson, Timothy L Can anyone point me in the right direction? -- Tim Musson Flying with The Bat! eMail v1.62q Windows 2000 5.0.2195 (Service Pack 2) How do you make Windows faster ? Throw it harder -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
