It's because
- File::Find gives you back directories, as well as files, and you don't perform a -f $_ test to see if it is a file or not
- you do a regexp like: $_ =~ ".c" which isn't doing what you think it is... for example "ac" will match that regular expression... you probably want: $_ =~ "\\.c", or perhaps even just /\.c/ which will do the same, but be more imediately recognizable.
Enjoy.
Update: fixed missing (second) backslash in the quotes.
------------
:Wq
Not an editor command: Wq