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"); } } }

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.