title: Using Perl's File::Basename to rename a file extension
body: <p>Reciving the following warning message, how do I get rid of it?</p>
  
  <p><code>Use of uninitialized value $suffix in concatenation (.) or string at /usr/share/perl5/File/Basename.pm line 167.
  Use of uninitialized value $suffix in substr at /usr/share/perl5/File/Basename.pm line 169.</code></p>
  
  <p>Code being used:</p>
  
  <pre><code>use File::Copy;
  use File::Basename qw(fileparse);
  
  my @mtf;
  my $name;
  my $dir;
  my $ext;
  my $ascii;
  my $suffix="";
  
  ($name, $dir, $suffix) = fileparse(@mtf,qr/\.[^.]*$/);
  $name =~ s/\.$suffix$//;
  system("cp $mtf[0] $name.ASCII");
  $ascii = "$name.ASCII";
  </code></pre>