Joshua Colson wrote: > > Hello Perl Mongers, > > I'm trying to compare two lists of users, but I would like input on what > each of you think would be the best way to do it? > > The first list is comprised of all users in a particular group, in the > /etc/group format. > The second list is very similar, but the format is slightly different. > For example: > First Group of Users, > testgroup:x:UID:user0,user1,user2,user3 etc. > > Second Group of Users, > members=user0,user1,user2 > > When a user is added to the first group I need to add them to the second > group also, and likewise for deleting.
When a user is added or deleted from the first group just copy the whole list to the second group since they are in the same format. > What I thought about doing was loading each list into a hash, and checking > to see if the keys are defined in the other groups hash, but I'm sure that > there is a better way. So, if anyone knows what it is, I would appreciate > the help. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]