in reply to Re: Re: Generating a grep command at run time
in thread Generating a grep command at run time
I am not sure what you mean by read normally instead of line-by-line. As best as I can tell, both Perl and grep see the file as a data stream. They read data into a buffer, they then process that buffer "line-by-line" by terminating on the newline character. The speed difference would be if the default buffer size is different - i.e. actual less physical reads as they only go back out to disk when the buffer is empty.
I agree that Perl offers all the functionality of the *nix grep and more, so resorting to using it for any reason other than raw speed seems like a bad idea. I would say that the reason not to use it isn't because of security or maintainability even though these are very valid points. To me, it is because of portability. This isn't even a matter of Win32 vs *nix portability - as can be seen in this thread.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Generating a grep command at run time
by chimni (Pilgrim) on May 27, 2003 at 05:57 UTC | |
|
Re: Re: Re: Re: Generating a grep command at run time
by hardburn (Abbot) on May 22, 2003 at 17:14 UTC | |
by Limbic~Region (Chancellor) on May 22, 2003 at 17:23 UTC |