title: Easiest scripting method to merge two text files - Ruby, Python, JavaScript, Java?
body: <p>I have two text files, one containing HTML and the other containing URL slugs:</p>
  
  <p><strong>FILE 1 (HTML):</strong></p>
  
  <pre><code>&lt;li&gt;&lt;a href="/article/"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Thomas Friedman&lt;/span&gt; - &lt;span class="title"&gt;The World Is Flat&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/article/"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Michael Dagleish&lt;/span&gt; - &lt;span class="title"&gt;Scotland In Wartime&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/article/"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Dr. Raymond Kinsella&lt;/span&gt; - &lt;span class="title"&gt;Progress In Cancer Treatments&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  ...
  </code></pre>
  
  <p><strong>FILE 2 (URL SLUGS):</strong></p>
  
  <pre><code>thomas-friedman-the-world-is-flat
  michael-dagleish-scotland-in-wartime
  dr-raymond-kinsella-progress-in-cancer-treatments
  ...
  </code></pre>
  
  <p>I need to merge them so that the slugs in FILE 2 are inserted into the HTML in FILE 1 like this:</p>
  
  <p><strong>OUTPUT:</strong></p>
  
  <pre><code>&lt;li&gt;&lt;a href="/article/thomas-friedman-the-world-is-flat"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Thomas Friedman&lt;/span&gt; - &lt;span class="title"&gt;The World Is Flat&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/article/michael-dagleish-scotland-in-wartime"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Michael Dagleish&lt;/span&gt; - &lt;span class="title"&gt;Scotland In Wartime&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/article/dr-raymond-kinsella-progress-in-cancer-treatments"&gt;&lt;button class="showarticle"/&gt;&lt;span class="author"&gt;Dr. Raymond Kinsella&lt;/span&gt; - &lt;span class="title"&gt;Progress In Cancer Treatments&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>What's the best approach and which language would be most appropriate to accomplish this task with a minimum of complexity?</p>