or download this
($this_mail) # puts the value in a list context so that values capture
+d by the regex are saved in the list (only the first match will be sa
+ved as there is only one variable available)
=
$this_in =~ # apply a regular expression to $this_in
/CN=(.*),CN=ExternalContacts/ # capture the
+bit in brackets
gio; #apply glob
+ally (g), case insensitively (i) and only compile once (o)