Of course, if you are in a *nix shell, you could do this straight from the command line without using Perl at all. I'm no whiz at this sort of thing, so the following could probably be shortened quite a bit - but it should give you the idea:
grep 'Login succeeded' log | awk '{print $7}' | sed s/,// | sort | uni
+q -c
1 abc
1 qwr
6 sa
1 xyz
Cheers,
Darren :)