"Dennis Stout"  wrote ...
        my %user_list = get_users($where);

        foreach (keys %user_list) {
                my $user = $_;
                foreach (@{$user_list{$user}{DOMAIN}}) {
                        $user_list{$user}{DOMAINS} .=
"$user_list{$user}{DOMAIN}[$_],";
                }
                chop($user_list{$user}{DOMAINS});
...

$user_list{$user}{DOMAINS} .= "$user_list{$user}{DOMAIN}[$_],";

That line is the culprit. $_ contains each domain name as a text string. Which evaluates to 0 when used as an integer, which then gives the first entry in the array. Thus you get the first entry in the array as many times as you have entries in the array. Try changing that to a regular (indexed) for loop and that should fix it.


Hope that helps.
-Andrew



Reply via email to