Thanks for the input! Bit of a brain freeze there ;p
All 3 methods have the desired effect.
Here is the benchmark info for thsoe playing along:
Benchmark: timing 1000000 iterations of %q = (%q, %w); , @q{keys %w} = values %w;, my(%c)=huh(%a,%b);...
%q = (%q, %w); : 0.459673 wallclock secs ( 0.46 usr + 0.00 sys = 0.46 CPU) @ 2173913.04/s (n=1000000)
@q{keys %w} = values %w;: 0.574297 wallclock secs ( 0.63 usr + 0.00 sys = 0.63 CPU) @ 1587301.59/s (n=1000000)
my(%c)=huh(%a,%b);: 0.672142 wallclock secs ( 0.60 usr + 0.00 sys = 0.60 CPU) @ 1666666.67/s (n=1000000)
Rate @q{keys %w} = values %w; my(%c)=huh(%a,%b); %q = (%q, %w);
@q{keys %w} = values %w; 1587302/s -- -5% -27%
my(%c)=huh(%a,%b); 1666667/s 5% -- -23%
%q = (%q, %w); 2173913/s 37% 30% --
I hope the mail client doesn't butcher it too much :)
Lee.M - JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>