in reply to Re^2: Permission denied Found to be Obsolete
in thread Permission denied Found to be Obsolete

!(-d $name)
should be
-f $name

After all, there's plenty of things a directory entry can be besides a plain file and a directory.

You should probably also consider whether the name test shouldn't instead be

$file !~ /^\./
because, theoretically, any file whose name begins with dot is supposed to be "hidden". Of course, you may in fact want to search the hidden files as well; I don't know.

We're building the house of the future together.