c:\@Work\Perl\monks>perl use strict; use warnings; use Data::Dump qw(dd); sub init_event { # define unique event records as anonymous hash refs. my $ar_events = [ { "name" => "Boise", "location" => { lon => -116.2, lat => 43.61 }, }, { "name" => "near sublett", "location" => { lon => -113.2104084, lat => 42.3278114 }, }, { "name" => "snowville", "location" => { lon => -112.7105234, lat => 41.9655701 }, }, { "name" => "juniper", "location" => { lon => -112.9842191, lat => 42.152429 }, }, # and so on... ]; # add standard date/time to each event record. my $date_str = "2021-10-14"; my $time_str = "03:22:31"; @{$_}{ qw(date time) } = ($date_str, $time_str) for @$ar_events; return $ar_events; } my $ar_ev = init_event(); dd $ar_ev; ^Z [ { date => "2021-10-14", location => { lat => "43.61", lon => "-116.2" }, name => "Boise", "time" => "03:22:31", }, { date => "2021-10-14", location => { lat => "42.3278114", lon => "-113.2104084" }, name => "near sublett", "time" => "03:22:31", }, { date => "2021-10-14", location => { lat => "41.9655701", lon => "-112.7105234" }, name => "snowville", "time" => "03:22:31", }, { date => "2021-10-14", location => { lat => "42.152429", lon => "-112.9842191" }, name => "juniper", "time" => "03:22:31", }, ]