title: Perl cannot stat $_
body: <p>I want the last modified time for each file in the directory. To make sure my loop is working I print $_ and I see the file names of the directory:</p>
  
  <pre><code>for ( @Files ) {
  
      opendir( D, $path . '\/' . $_ ) or die "$!";
      my @textfiles = grep { ! /^\.{1,2}$/ } readdir( D );
  
      for ( @textfiles ) {
  
          #    print "$_\n";   &lt;----the file names.
          my $epoch_timestamp = ( stat( $_ ) )[9];
          print "$epoch_timestamp\n";
      }
  </code></pre>
  
  <p>I get this error</p>
  
  <blockquote>
    <p>Use of uninitialized value $epoch_timestamp in concatenation (.) or string</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>