In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Tim Musson) writes:
>Thanks Peter!,
[snip]
>PS> my $href = $result->as_struct;
>PS> for my $dn (keys %$href) {
>PS>   print "cn of $dn is $href->{$dn}{cn}[0]\n";
>PS> }
>
>That is exactly what I was looking for!
>
>PS> (That's taking advantage of the fact that you can leave out -> between
>PS> closing and opening {} or [].)
>
>So my problem was that I was dereferencing the hash, but not the array
>reference it was talking About? 

Right.

>or was it that I was not using the [0]?

Same thing; in that context [0] is equivalent to ->[0],
which is a dereference to extract an element.

Look for Randal Schwartz's new book on references from O'Reilly.

-- 
Peter Scott
http://www.perldebugged.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to