in reply to using -M with File::Find (was: -M thing)
You need to use -M $_ rather than -M File::Find::name.
Your code is printing $m. It's just that $m is empty, because -M $File::Find::name can't find the file. File::Find goes recursively through directories and chdirs into each one it encounters. $_ is the filename relative to the current directory. $File::Find::name is the filename relative to the directory you started in (i.e. the one you ran the script in).