in reply to HTML::Template Error

my (@network_data, @location_data) = get_data();
after this assignment @location_data is empty. try references:
my ($network_data, $location_data) = get_data(); # loop over @$network_data for example
read perlref for details.