in reply to Re: Swapping Two Hash Values
in thread Swapping Two Hash Values

@hash{$item,$item-1} = @hash{$item-1,$item};

Aha! Now I see what I was doing wrong -- I had

$hash{$item,$item-1} = $hash{$item-1,$item};

So I probably created another key which is not 5 but 5-undef or something?

Thank you both very much.
--

“Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
M-J D