added perl wrapper for group_stats.r