title: Perl script looking for a file with relative name
body: <p>I have a directory that is:</p>
  
  <pre><code>/foo/bar/logs_69915
  </code></pre>
  
  <p>the number of the last directory (logs_69915) changes every 5min.</p>
  
  <p>the file inside that directory is named:</p>
  
  <pre><code>statuslog.1234.log
  </code></pre>
  
  <p>and the number on this log file also changes.</p>
  
  <p>How can I set a variable to this file?</p>
  
  <p>I have tried: </p>
  
  <pre><code>my ($file) = glob '/foo/bar/logs*/statuslog*.log';
  </code></pre>
  
  <p>with no success</p>