in reply to Re: assignment to hash with duplicates in list context (accidents)
in thread assignment to hash with duplicates in list context (bug?)

The usability of

@l=%h2=reverse %h1;

may be debatable ...

But %h2 identical to %h3 in

%h3=%h2=reverse %h1;

is IMHO normal expected behavior.

The problem is related to collisions, no collisions no problems.

lanx@nc10-ubuntu:~$ perl -MData::Dumper -e ' @h1=(1 => 3, 2 => 5, 3 => + 10); %h3=%h2=@h1; print Dumper \%h2,\%h3' $VAR1 = { '1' => 3, '3' => 10, '2' => 5 }; $VAR2 = { '1' => 3, '3' => 10, '2' => 5 };

Cheers Rolf

( addicted to the Perl Programming Language)