in reply to Re: undef speedup ?!
in thread undef speedup ?!
add my (%h_delete, %h_list, %h_undef); at the appropriate place near the top of the script,That would not be a smart thing to do. You do know what the effect of my is, don't you? It makes its argument(s) lexical variables. Meaning that those variables are visible only in the current block, and not from other blocks or files. Which means, not from the Benchmark.pm file either. The Benchmarking code will access the package variables %h_delete, %h_list, %h_undef - just like the program would if you leave out the my.
The important lesson to be learned is that one should never blindly apply my to variables. Always know what you are doing, and always consider the consequences.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: undef speedup ?!
by davido (Cardinal) on Feb 09, 2004 at 16:57 UTC | |
by Abigail-II (Bishop) on Feb 09, 2004 at 17:39 UTC |