What i'm trying to do is modify some existing code for the way my company's server connects to Bugzilla. The code uses a file called "params" which is nothing but one long hash, but all of the existing elements are scalar, so it looks something like this:
%param = (
'LDAPbaseDN' => 'dc=company',
'LDAPstarttls' => 0,
'LDAPuidattribute' => 'uid',
'allow_attach_url' => 0,
'allow_attachment_deletion' => 0,
'allowbugdeletion' => 0,
'allowemailchange' => 0,
...etc...
);
Then the perl file that i'm using calls to one of these elements with something like this:
$baseDN = Bugzilla->params->{"LDAPbaseDN"};
so that $baseDN = "dc=company". I know this syntax is correct, because the code works as it should. What I want to do is add a new element to that hash which is a list of strings, such as the names of groups of employees, so that when I do something like the following in my code, I reference to that list of groups:
@groups = Bugzilla->params->{"LDAPgroups"};
Say I have group1, group2, and group3. How do I list them as one element in the %param hash? And how would I implement this array in a loop in my code?