So, let me get this straight. You want to:

1. Parse through RASPhone.pbk
2. Capture the heading inside [brackets] to a $var
3. Parse for 'PhoneNumber=' line and test for a match on phone number
4. If no match, capture next heading to $var
5. If match found, keep header it was found under
6. Bob's your uncle

Possible problem I forsee is the format of phone number. Some may include hyphens, some spaces, some fewer digits, etc. Can you search on subset (ie. last four digits) of number and ensure you have correct entry?

I'm not promising to write the code, just flowcharting to get an understanding.

[ 23 August 2001: Message edited by: LLigetfa ]

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.