in reply to Re^2: recursive searching in directories
in thread recursive searching in directories

$. is a special variable, and probably doesn't do what you think in the regex. You probably want m/\.c$ (and no g at the end).

See perlretut for a gentle introduction to regular expressions.