sub unfold_hash { my ( $raw_hr ) = @_; my %res; for my $k ( keys %$raw_hr ) { $res{$k} = $raw_hr->{$k}; } print "unfold_hash ", %res ? scalar %res : 0, "\n"; \%res; } $result_hr= unfold_hash($data); print Dumper $result_hr;
In reply to Re: passing a hash ref in a sub
by pDaleC
in thread passing a hash ref in a sub
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |