http://www.perlmonks.org?node_id=1024054


in reply to Re^3: Returning hash reference from a sub
in thread Returning hash reference from a sub

The line %final_data = @loop_data will take the array and map the elements:

my @a = ('H','e','l','o'); my %fus = @a;
so you will get
%fus: H -> e, l -> o
In case you assign an odd list to %final_data the code will break!
What about crating and array of hashes? and return the reference to the array?