title: deleting files with perl
body: <p>I'm trying to write a perl script that reads filenames in a test.txt file into an array, and then deletes the files based on the filenames in the array.  Here's what I've got so far...</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  open(FILE, "test.txt") or die("Unable to open file.");
  
  my @data = &lt;FILE&gt;;
  
  close(FILE);
  
  foreach my $line (@data){
          unlink($line);
  }
  </code></pre>
  
  <p>test.txt and remove_files.pl are in the same directory as the files to be removed.  I can't figure out why the script won't delete the files.  Am I missing a module?</p>