in reply to Re^2: count of USER UNIX groups
in thread count of USER UNIX groups

my @groups = split ' ', `groups $ENV{USER}`; print join('-', @groups[2 .. $#groups]) . "\n";
but you really should read and understand How do I post a question effectively?