You should use a regular expression like this:
while (<>) { print if /\.c$/; } [download]
In reply to Re: greping for names by moxliukas in thread greping for names by Sara