if(Win32::AdminMisc::UserGetMiscAttributes('DOMAIN', "user", \%Hash)){ print "The user is in the primary group with a RID $Hash{USER_PRIMARY_GROUP_ID}\n"; } #### $groupRID = getRID($groupName); print "$groupName has the RID $groupRID.\n";