in reply to
How Not to Alter Hash in HoA while Counting Array
Simply making a new reference to a copy of the array may solve your problem:
my $ar = [ @{$hashref->{$key}} ];
Comment on
Re: How Not to Alter Hash in HoA while Counting Array
Download
Code
In Section
Seekers of Perl Wisdom