develooper Front page | perl.beginners | Postings from March 2002

FW:

From:
J.Hourihane
Date:
March 13, 2002 07:24
Subject:
FW:
Message ID:
9877566273EED511A7560008C716DA06B3DD@exchcpn1.cdcna.com

Hi guys I am having trouble trying to figure out how to do a match between
two hashes
basically I have the $login and $gid from the passwd file and the $gid and
$gname fields from 
the group file. (I got these from getpwent and getgrent)


#!/util/perl5.static -w
# Build phash
%phash = ();
$gid => $login
@gid = keys( %phash );

# Build ghash
%ghash = ();
$gname => $gid

# Match $login to $group
foreach $gid (@gid) {

	if ($gid =~ / /;   ) {
		#Build $login => $gname Hash

	}


}



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About