in reply to Variable usage
print will waste a lot more time (think: several orders of magnitude) than anything else that happens in that loop. You're just wasting your time. Even if one type of loop variable is double the speed than the other (and trust me, that won't be the case), you still will not notice, at all.
And if you have legitimate reasons to optimize things, try Benchmark first, to compare execution times of equivalent code snippets, and one of the "Profile" modules on CPAN to see where your module is really wasting time. The latest buzz is that Devel::NYTProf is currently the best module for that purpose.
|
|---|