On Jan 22, 2008 10:56 PM, Vahid Moghaddasi <[EMAIL PROTECTED]> wrote: > On Jan 22, 2008 9:31 PM, Chas. Owens <[EMAIL PROTECTED]> wrote: > > > > Off hand I think that would only happen if the user name or the uid > > was the same for some of your users. Can you present a cleaned up > > version of your data the exhibits the problem? Also, You might want > > to rewrite your loop more compactly and avoid duplicate calls to > > Thanks for the code. I used it but have some problems, it prints > GLOB(0x9de5ce4) about 1000 times all in one line. snip
Ah, I always get bitten by that. It needs to be print $out $_; snip > Shouldn't my code keep one of the duplicate users instead of taking > them both out? snip On the first pass through for the uid 10 and uname foo, $seen{10} and $seen{foo} will both be one and therefore the next will not be triggered (it only triggers if at least one of them is greater than one). On the second pass through for uid 10 and uname foo, $seen{10} and $seen{foo} will be two and it will skip that line. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/