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.while (<>) { if ($theCfile =~ /\.c$/) { print $_ } }
In reply to Re: greping for names
by sschneid
in thread greping for names
by Sara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |