title: Return reference to an array in Perl
body: <p>First off, let me tell you that I have worked very little with Arrays and never with Hashes. Also, Perl is not my strongest scripting language.  I come from a background in shell scripting.  </p>
  
  <p>That said, I have this in a Perl script:</p>
  
  <pre><code>$monitored_paths = { '/svn/test-repo'  =&gt; 'http://....list.txt' };
  </code></pre>
  
  <p>The URL points to a file which contains a list of paths like this:</p>
  
  <pre><code>/src/cpp
  /src/test
  /src/test2
  </code></pre>
  
  <p>The objective is to replace the URL with the contents:</p>
  
  <pre><code>$monitored_paths = {'svn/test-repo' =&gt; '/src/cpp', '/src/test', '/src/test2'}
  </code></pre>
  
  <p>What would be the best way to achieve this?   Thanks! </p>
  
  <p>Sam </p>