I dunno if it's an array or a reference ot an array anymore, heh.
Whats happening, is instead of this thing pulling all 3 of my domains from a
database, it's pulling the first domain in the list as many times as I have
domains for. So when I only had 2 domains in the db for myself, it listed
hte
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}[$_],;
}
shouldnt 'my $user' be outside the foreach loop?
I had a similar coding problem this weekend - completely unrelated to
mod_perl. I was using
www::mechanize (greatest module ever) to parse xml and generate files. If
i had 18 user sections, it
was writing the last member to disk 18 times.
shouldnt 'my $user' be outside the foreach loop?
No, it's supposed to be changed each iteration through the loop. Basically it
saves $_ to something else, so the next foreach loop doesn't overwrite it,
since I need it's value as a key for the hash the next loop creates.
Dennis
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}[$_],;
At 01:22 PM 7/21/2003 -0800, Dennis Stout wrote:
Dennis Stout wrote ...
my %user_list = get_users($where);
foreach (keys %user_list) {
my $user = $_;
foreach (@{$user_list{$user}{DOMAIN}}) {
On Mon, Jul 21, 2003 at 02:38:20PM -0700, Andrew Hurst wrote:
At 01:22 PM 7/21/2003 -0800, Dennis Stout wrote:
Dennis Stout wrote ...
my %user_list = get_users($where);
foreach (keys %user_list) {
my $user = $_;
foreach