in reply to help reassigning hash with arrayref

It's not clear what you want to achieve, but most likely you want a deep copy like this:

for my $key (keys %tmp) { $hash{$key} = [@{$tmp{$key}}]; }
True laziness is hard work

Replies are listed 'Best First'.
Re^2: help reassigning hash with arrayref
by mhearse (Chaplain) on Nov 15, 2011 at 23:25 UTC
    I want to end up with:
    $hash{one} = { $key => $tmp{$key} };
    But for some reason the array is being assigned in scalar context.

      No, that is not what you want to end up with. You may think that is what you need to do to end up with whatever it is that you want, but it's the (presumably non-working) means to an end. It would help a lot if you showed us the structure you want to end up with. What do you want to see in %hash?

      True laziness is hard work
        Thanks. You are correct. But I'm still have an issue with the array being assigned in scalar context.