in reply to greping for names

Your regex seems to be a bit messed up...
while (<>) { if ($theCfile =~ /\.c$/) { print $_ } }
Matching on regex uses the =~ operator, not eq, and $ anchros it to the end of the line, so that one.cpp will not be included.

Hope it helps.

scott.