Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
HI!
Sorry for this really newbie question, but I was just wondering if grep works the same in UNIX and perl.
Right now I can do this in grep:
grep pattern filename
And i'll know if that pattern occurs in the file. But from my reading so far, as I can tell, this function in perl only works in the sense that grep(pattern,list) but I would rather search a file then a list.
I have alternative ways to perform the action of grep. But I'd like to use the power of grep to do my dirty work for me.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Questions about Grep
by friedo (Prior) on May 29, 2008 at 19:02 UTC | |
by pc88mxer (Vicar) on May 29, 2008 at 19:14 UTC | |
by Anonymous Monk on May 29, 2008 at 19:23 UTC | |
|
Re: Questions about Grep
by dwm042 (Priest) on May 29, 2008 at 20:06 UTC | |
by graff (Chancellor) on May 30, 2008 at 02:01 UTC | |
|
Re: Questions about Grep
by oko1 (Deacon) on May 29, 2008 at 20:28 UTC | |
|
Re: Questions about Grep
by planetscape (Chancellor) on May 29, 2008 at 21:45 UTC |