in reply to Timing a Subroutine with Parameters
You're trying to execute a reference that points to the return of the stuff sub. Instead you probably want something like this$t = timeit(1, \&stuff(1000000)); ^
If you want to time functions within programs you may also want to check out the Devel::DProf module.$t = timeit(1, sub { stuff(1000000) });
_________
broquaint
|
|---|