in reply to Re^2: Problem with doubles results
in thread Problem with doubles results

It looks like you should move
%hash = ( "info" => $json_msg); push( @updated_data, \%hash );
outside of the foreach loop. Or are you just wanting to do something like:
foreach my $res (@$result) { my ($name, $country, $gender) = @$res; push @updated_data, {info => "<p>$name $country $gender</p>"}; }
?

Replies are listed 'Best First'.
Re^4: Problem with doubles results
by frank1 (Monk) on May 17, 2024 at 20:39 UTC

    WOW this has worked for me

    so amazing could be easy like this

    Thank you so much, appreciate

    foreach my $res (@$result) { my ($name, $country, $gender) = @$res; push @updated_data, {info => "<p>$name $country $gender</p>"}; }