title: Extracting file names
body: <p>I'm writing a script that takes a list of files from a directory, opens each one, and then searches for the lines that contain a filename with the .zip extension. Then I want to strip out just the filename from the line. Here is my code:</p>
  
  <pre><code>foreach (@fnames) {
      chomp ($_);
      open FILE, '&lt;', "$_";
      @archives = grep { /.+?\.zip/ } &lt;FILE&gt;;
  
      foreach (@archives) {
          if ($_ =~ /("|&gt;)(.+?)("|&lt;)/) { push @files, $2; }
      }
  }
  </code></pre>
  
  <p>The files I'm pulling the data from will contain the .zip filenames between either double quotes or angle brackets. This code is returning nothing, but I know the filenames are there. If I do a grep in the terminal I can see all of them, but the grep in Perl isn't giving me anything. Any ideas?</p>