Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks, I would like to know can I use grep (with other function) to mimic the GNU grep -n, which return the array index as line number with or without the content?
Also, when matching a string with fixed strings, which one will be faster?
1. GNU grep -F (or fgrep) called from perl (via system() or backticks)
2. perl grep()
Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep return the index instead of the element content, and its speed
by ikegami (Patriarch) on Feb 28, 2008 at 09:38 UTC | |
by Anonymous Monk on Feb 28, 2008 at 09:51 UTC | |
by ikegami (Patriarch) on Feb 28, 2008 at 10:30 UTC | |
|
Re: grep return the index instead of the element content, and its speed
by grinder (Bishop) on Feb 28, 2008 at 10:38 UTC | |
by Anonymous Monk on Oct 08, 2010 at 17:27 UTC |