title: Use of uninitialized value in a Perl script
body: <p>I have the below program for checking the file availability in a Unix directory.</p>
  
  <pre><code>my $numbera = "c://";
  my $numberb = "test1.txt";
  check_file_exist($numbera, $numberb);
  
  sub check_file_exist {
      my $download_filename;
      my ($numbera,$numberb) = @_;
      $download_filename = $numbera.$numberb;
      print "*** $download_filename ****";
      my $mtime = (stat $download_filename)[9];
      my $filedatetime = scalar localtime $mtime;
  
      if (-e $download_filename) {
          print "Data File Exist which is created on $filedatetime";
      }
      unless (-e $download_filename) {
          print "File not exists";
      }
  }
  </code></pre>
  
  <p>while running the program I am getting the below error:</p>
  
  <pre><code>*** data_file=HASH(0xa912f0)/home1/saravanan/ ****
  Use of uninitialized value in localtime at /home1/saravanan/data_file.pl
  </code></pre>