I'm not sure I understand what you mean. The variables
being swapped are created beforehand in both methods. In
the first examples, they are separate variables. In my
second example, they are members of an array. Each of the
subs swap the values in two variables.
I mainly included them to point out:
TMTOWTDI
My benchmarks show arrays are even slower than the
lists in the first example.
:-)
Russ
Brainbench 'Most Valuable Professional' for Perl