This is probably going off-topic. From the LDIF structure displayed and the mention of %ldif, I assumed the keys are 'sn', 'mail', etc. What the keys are, rather, would correspond to the contents of $ldif{'sn'}.
Since $ldif{$key} either contains a scalar value or (a reference to) an array, this seemed the simplest way to fit things together. I can see the use in having the attributes for an LDAP entry as keys in your hash.
I don't directly see much point on the contents being useful as keys to an array, but that doesn't mean that there couldn't be any :)
In reply to Re^3: is it an array?
by rkrieger
in thread is it an array?
by vlashua
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |