in reply to Re^15: Merge hashes in specific format
in thread Merge hashes in specific format

Thank you. I didn't know there is a special operator like this one. Another small question if you may. Is it possible to insert the data into two hash at the same line? something like:
(%{$one},%{two}) = ( data => { ( %{ $data{data} }, %{ $one->{data} // {} } ) }, total => do { my %total; for my $href ( $one->{total}, $data{total} ) { $total{$_} += $href->{$_} for keys %{ $href }; } \%total; } );

Replies are listed 'Best First'.
Re^17: Merge hashes in specific format
by LanX (Saint) on Jan 13, 2019 at 02:13 UTC