The use of the function
map rather than
foreach... and
zip (from
List::MoreUtils) eliminates the need for all your temporary variables and the associated reference/dereference.
use List::MoreUtils qw(zip);
my $TicketRecords = [] ;
@{$TicketRecords} = map {
{ zip @TicketFields, @$_ }
} @$data;