in reply to What is this line doing in the perl script?

             whats is this line doing with the input above
(($this_mail) = ($this_in =~ /CN=(.*),CN=ExternalContacts/ +gio));

Why don't you check yourself? Just add a

print ">>>$this_mail<<<\n";
directly after your line. Then you'll see. The >>><<< are just visual delimiters - they help you to spot if your variable has some leading or trailing blanks.

If you have trouble understanding regexes, try this web-resource.

Or read some of the docs in this collection of planetscape

HTH, Rata