Hello all,

I am having trouble understanding some programming logic/syntax. This program looks like it is using what someone referred to as a reference to an array (and that doesn't make a ton of sense to me, I am only familiar with arrays, scalar variables, and hashes).

The blurb of code looks like this

==================================================================
$su_login->SetAccountRules("$fields{'login'}",
[EMAIL PROTECTED]) 
                  
|| die "Error: ".$cli->getErrMessage.",
quitting";

==================================================================
This blurb comes from code using a module named CLI.pm which is a module
that was developed as an interface to administer the CommuniGate Pro mail server.
What I do not understand is the [EMAIL PROTECTED] , is this an array with arrays as its list members?
Higher up in the script it does this with the [EMAIL PROTECTED]

==================================================================

 my
$rules=$cli->GetAccountRules("$fields{'login'}")
                  
|| die "Error: ".$cli->getErrMessage.",
quitting";

  my @rules = @{$rules};

  for(0..$#rules) {
    if($rules[$_][1] eq "blacklist") {
      $rules[$_][0] = $personal_bl_setting;
      $existing_bl = 1;
      last;
    }
  }
===================================================================

Can anyone offer the following....

1. In idiot's terms, what is this rules thing what does it look like?
2. How do I add to it? (I assume $rule[0][2] = "something"; )

Thanks for any help you might be able to offer.

Reply via email to