in reply to pushing onto array is not working as intended..
Your output looks like a hash or list was pushed on the array instead of a hash reference. Sure enough, the first if has:
instead ofpush @{$records}, %record;
push @{$records}, \%record;
Note the missing backslash.
|
|---|