in reply to Benchmark diamond operator
close ARGV if eof;
I haven't tested any of this, but I believe this close statement in each of the test_* functions will prevent the other from doing anything: you can't read anything on a closed filehandle. Rather than close-ing the ARGV filehandle, I would seek to the beginning of the handle before each data-read operation in each test function.
Update:
... seek to the beginning of the handle before each data-read operation in each test function.A little experimentation shows my idea is wrong. seek cannot be used on ARGV before execution of the <> operator in the
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Benchmark diamond operator
by thanos1983 (Parson) on May 09, 2017 at 15:13 UTC |