in reply to stat function used with linux find gives me no data

There's a newline "\n" on the end of the string you read, and you need to "chomp" it before passing to stat.

Meanwhile, most of us working on this sort of problem would use something more convenient like File::Find, Path::Tiny->visit, Path::Class::Dir->recurse, or at the very least, File::stat.