in reply to
greping for names
Your regex seems to be a bit messed up...
while (<>) { if ($theCfile =~ /\.c$/) { print $_ } }
[download]
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.
Comment on
Re: greping for names
Select
or
Download
Code
In Section
Seekers of Perl Wisdom