in reply to Re: A unique question help!
in thread A unique question help!

Interesting, can you explain this line:
$seen{$user} = 1;

Thanks!

Replies are listed 'Best First'.
Re^3: A unique question help!
by kennethk (Abbot) on Oct 14, 2009 at 17:54 UTC
    %seen is a hash, and so $seen{$user} = 1; sets the key stored in $user in %seen to 1 (perldata). 1 is true in Perl, so the second time the same key is encountered, the test if ($seen{$user}) { will be true, and the code will execute next, skipping ahead in the for loop.