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. I changed the scope of my vars slightly and all worked just fine.
-- gedanken