/ Published in: Perl
Expand |
Embed | Plain Text
################ #COMPARE_N_SUBSTITUTE #Compare a hash to a fall-through hash. If any values are present in the fall-through and not in the current values then insert them in the DYC hash. #compare_n_substitute(hash1, hash2) #insert key-value-pairs from hash2 into hash1 only if those pairs are not defined in hash1. #compare_n_substitute(\%hash, \%default) sub compare_n_substitute(\%\%) { my ($hashref, $fallthrough_hashref) = @_; $$hashref{$key} = $$fallthrough_hashref{$key}; } } }
You need to login to post a comment.
