I keep trying to do this for different things. I have not found a method I like yet. So here is specifically what I am trying to do *this time*.
My current customer has been having problems with members dropping out of various MS Active Directory Security Groups. So I figured I would toss a bit of code together in my spare time (yah, like that exists). I have the bit that dumps an LDIF file starting at a particular point in the AD Tree. Where I am hitting a wall is processing that LDIF file... Here is an example of my data (note the blank line separating dn:'s. ,----- | dn: CN=p106730,OU=Scr-Prt,OU=AB,DC=Stuff | ====8<---------------- snip | member: CN=trn,OU=Scripts,OU=AB,DC=Stuff | member: CN=uci,OU=Scripts,OU=AB,DC=Stuff | ====8<---------------- snip | groupType: -2147483644 | ====8<---------------- snip | whenChanged: 20040927234946.0Z | whenCreated: 20030401203303.0Z | <<<< Blank Line Here | dn: CN=p101714_mb8,OU=Scr-Prt,OU=AB,DC=Stuff | ====8<---------------- snip | groupType: -2147483644 | ====8<---------------- snip | whenChanged: 20040927234926.0Z | whenCreated: 20020531152229.0Z `----- This is what I want to keep for each (blank line separated) dn:. ,----- [ ] | dn: CN=p106730,OU=Scr-Prt,OU=AB,DC=Stuff | member: CN=trn,OU=Scripts,OU=AB,DC=Stuff | member: CN=uci,OU=Scripts,OU=AB,DC=Stuff | groupType: -2147483644 | | dn: CN=p101714_mb8,OU=Scr-Prt,OU=AB,DC=Stuff | groupType: -2147483644 `----- I know I can change the record separator to \n\n to get one dn: section at a time, but how do I then process the individual lines? I don't seem to ever have any luck setting the record separator back to \n... Or am I going about this all wrong? End result, I would like a report of the members of the security groups daily and a diff of yesterdays report from todays. Thanks for any suggestions you may have. btw, I am running this on MS, but if you have *nix examples, I can work with that too. Thanks again! -- Tim Musson Flying with The Bat! eMail v2.12.00 The days of the digital watch are numbered. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>