Perl has built in group search functions such as getgrent(), getgrnam(), etc. When using them, they look at the /etc/group file on your unix box. Is there a way to specify a different file these functions look at?

Background: I'm creating a system which pulls in the group file modifies it and pushes out a new one. The issue is, /etc/group is not actual file it modifies, however it is in all the same format.

Before telling me I'm doing it wrong, can you help me solve my issue ? This is a NIS+ system so group files are not locally stored. I'm trying to keep my post as simple as possible...no reason to explain all of this.