http://www.perlmonks.org?node_id=857101

anakin30 has asked for the wisdom of the Perl Monks concerning the following question:

hie there

can someone help me

i have this line as input file

CN=L.Yakin@postdirekt.de,CN=ExternalContacts,DC=dhl,DC=com

whats is this line doing with the input above

(($this_mail) = ($this_in =~ /CN=(.*),CN=ExternalContacts/gio));

This is the line in input file

CN=L.Yakin@postdirekt.de,CN=ExternalContacts,DC=dhl,DC=com

This is the perl script if you need to refer

open( IN, "$INFILE" ); while( $this_in = <IN> ) { if ($this_in =~ /^dn: /gio) { (($this_mail) = ($this_in =~ /CN=(.*),CN=ExternalContacts/gio)); $this_user = $conn_in->search(base => $ldapopts_root, scope => " +sub", filter => "(|(mail=$this_mail)(mailAlternateAddress=$this_mail) +)", attrs => ['uid','mail','mailalternateaddress','cn','ou']); &Debug( 3, "Search:(|(mail=$this_mail)(mailAlternateAddress=$thi +s_mail))"); if ($this_user->entries) { foreach $my_entry ($this_user->entries) { $entry_uid = $my_entry->get_value('uid'); $entry_mail = $my_entry->get_value('mail'); @all_alts = $my_entry->get_value('mailalternateaddress'); $my_alt_all = ""; foreach $entry_alt (@all_alts) { $my_alt_all .= $entry_alt; $my_alt_all .= ","; } chop($my_alt_all); $entry_cn = $my_entry->get_value('cn'); $entry_ou = $my_entry->get_value('ou'); &Debug( 3, "$entry_ou|$entry_uid|$entry_mail|$my_alt_all|$en +try_cn"); } } elsif ($this_in =~ /deutschepost/gio) { chop($this_in); &Debug( 2, "$this_in"); &Debug( 2, "changetype: delete\n"); } else { (($this_mail1) = ($this_mail =~ /\@(.*)/gio)); &Debug( 1, "$this_mail1"); } } }