Q:

Can't open files in subdirectories in Perl

I'm having a really hard time.  I'm new to Perl and I'm completely stuck trying to traverse all subdirectories, performing an operation.  It works fine in the root dir (of where my script is), but as soon as it gets to a subdirectory, it bombs.  I've tried surrounding the filename in " or ' or q{} to no avail.  I've searched for this problem on StackOverflow and people are saying it should just work, that open handles subdirs and will accept forward slashes.
It's failing on the first open (reading a file) as soon as it dives into a directory and tries to open './Horse/Models.meta'.  This is after it processed 20 files at the same level as my script.  Any ideas?
use 5.010;
use strict;
use warnings;
use File::Find;

find(sub {
if (-f and /\.meta$/) {
    print "--> " . $File::Find::name . "\n";
    open my $in,  '<',  $File::Find::name    or die "Can't read old file: $!";
    open my $out, '>', "$File::Find::name.new" or die "Can't write new file: $!";

    while( <$in> )
    {
            if(index($_,"  assetBundleName:")!=-1) {
                    print $out "  assetBundleName: mobs\n";
            } else {
                    print $out $_;
            }
    }
    close $out;
    print("mv -f \"" . $File::Find::name . ".new\" \"" . $File::Find::name . "\"\n");

    system("mv -f \"" . $File::Find::name . ".new\" \"" . $File::Find::name . "\"");

  }
}, '.');

A:

Just use
rename "$File::Find::name.new", $File::Find::name or die $!;

See rename.
If you want to use the relative path (i.e. $File::Find::name) instead of just the filename (i.e. $_), you need to specify
find({ wanted   => sub { ... },
       no_chdir => 1,
}, '.');

