in reply to Re: 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.
I mean doing read(FH, $buf, $size); instead of my $buf = <FH>;. The plain read() call is faster than line-by-line reading, though generally harder to program around for many practical purposes. Most of the time, disk access will be a greater factor than the method of reading the file, so it's not something that I lose sleep over.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Generating a grep command at run time
by Limbic~Region (Chancellor) on May 22, 2003 at 17:23 UTC |