For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > April 2007 > Reading and comparing with a criteria file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reading and comparing with a criteria file
Chad Kemp

2007-04-26, 3:58 am

Hello all. I have a question regarding reading in a criteria file,
storing that criteria in memory and reading in user IDs from another
file periodically, comparing attributes associated to that ID to the
criteria i have stored, and placing those IDs which match into groups
defined by the criteria.

It is an LDAP directory, so multivalued attributes are possible.

Basically what i have to do is

Read in Criteria, allowing for Regex compares (a value could be compared
with something like \w{3}\d{1}\D or something similar) and multivalued
attributes
store it in memory
read in a UID, look up that ID in the LDAP directory
compare the values of that user to my criteria and adjust their group
memberships accordingly.
This would be run with Cron nightly (possibly more often if i can
trigger a reload of criteria should they change)

I was thinking about using a hash of hash of hashes... 3 levels (or
more) of hashes... anonymous...

is that possible with Perl? is there a better way?


Thanks in advance!

Cheers


CK

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com