Another approach (usually recommended with Benchark) is to provide a string to eval rather than a subroutine reference(Bold is mine). I dropped into the Benchmark documentation, and I indeed found:
a code reference will show a slightly slower execution time than the equivalent eval'd stringI only wonder... why?
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
In reply to Re^2: cannot get Benchmark to work
by polettix
in thread cannot get Benchmark to work
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |