title: Tetris-ing an array
body: <p>Consider the following array:</p>
  
  <pre class="lang-none prettyprint-override"><code>/www/htdocs/1/sites/lib/abcdedd
  /www/htdocs/1/sites/conf/xyz
  /www/htdocs/1/sites/conf/abc/def
  /www/htdocs/1/sites/htdocs/xyz
  /www/htdocs/1/sites/lib2/abcdedd
  </code></pre>
  
  <p>what is the shortest and most elegant way of detecting the <em>common base path</em> - in this case</p>
  
  <pre class="lang-none prettyprint-override"><code>/www/htdocs/1/sites/
  </code></pre>
  
  <p>and removing it from all elements in the array?</p>
  
  <pre class="lang-none prettyprint-override"><code>lib/abcdedd
  conf/xyz
  conf/abc/def
  htdocs/xyz
  lib2/abcdedd
  </code></pre>