Global symbol "$data" requires explicit package name ... #### push @data, $data->[0]{'xml_api_reply'}{'weather'}{'report_date'} = {'-data' => $today }; #### push @data, $weather_data->[0]{'xml_api_reply'}{'weather'}{'report_date'} = {'-data' => $today };