in reply to Is there a cleaner way to write this code below, which includes derferencing references, that themselves have to be dereferenced?

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;
Bill
  • Comment on Re: Is there a cleaner way to write this code below, which includes derferencing references, that themselves have to be dereferenced?
  • Select or Download Code