in reply to Newbie Regex Problem
The '*' is greedy, matching as much as it can. To make it non-greedy, put a question mark after it.
if ($test =~ "LDAP://CN=(.*?),.*") { [download]
non-Perl: Andy Ford