title: Find a string in one file and append part of it to matching line in another file
body: <p>I have two files</p>
  
  <p>first:</p>
  
  <p>8237764738;<strong>00:78:9E:EE:CA:6F</strong>;FTTH;MULTI<br>
  8237764738;2C:39:96:52:47:82;FTTH;MULTI<br>
  0415535921;<strong>E8:BE:81:86:F1:6F</strong>;FTTH;MULTI<br>
  0415535921;2C:39:96:5B:12:C6;EZ;SINGLE<br>
  ...etc</p>
  
  <p>second:</p>
  
  <p><strong>00:78:9E:EE:CA:6F</strong>;2013/10/28 13:37:50<br>
  <strong>E8:BE:81:86:F1:6F</strong>;2013/11/05 13:38:30<br>
  00:78:9E:EC:4A:B0;2013/10/28 13:59:16<br>
  2C:E4:12:AA:F7:95;2013/10/31 13:57:55<br>
  ...etc</p>
  
  <p>and I have to take mac_address (second position) from the first file and find it in the second one 
  and append (if match) to first file the date at end from the second file.</p>
  
  <p>output:</p>
  
  <pre><code>8237764738;00:78:9E:EE:CA:6F;FTTH;MULTI;2013/10/28 13:37:50   
  0415535921;E8:BE:81:86:F1:6F;FTTH;MULTI;2013/11/05 13:38:30  
  </code></pre>
  
  <p>I write a simple script to find the mac_address 
  but I don't know how to put in the script to add the date.</p>
  
  <pre><code>my %iptv;
      my @result;
      open IN, "/home/terminals.csv";
      while (&lt;IN&gt;) {
          chomp;
          @wynik = split(/;/,$_);
          $iptv{$result[1]} = $result[0];
          }
      close IN;
  
      open IN, "/home/reboots.csv";
      open OUT, "&gt;/home/out.csv";
      while (&lt;IN&gt;) {
          chomp;
          my ($mac, $date) = split(/;/,$_);
          if (defined $iptv{$mac})
          {
          print OUT "$date,$mac \n";
          }
      }
      close IN;
      close OUT;
  </code></pre>