Sure you'll introduce a bit of Disk IO, but it's the same DiskIO for all of your test threads, so it should wash out in terms of a comparison.
Are you sure? The example data is far less than the size of a buffer, so won't Perl fill up a buffer and only then write it? That pattern will be predictable but it won't be uniform across those files.
Benchmarking is difficult; IO doubly so.
In reply to Re^2: Question with Benchmark.pm
by chromatic
in thread Question with Benchmark.pm
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |