Skip to content

Instantly share code, notes, and snippets.

@roktas
Created May 4, 2010 23:13
Show Gist options
  • Save roktas/390175 to your computer and use it in GitHub Desktop.
Save roktas/390175 to your computer and use it in GitHub Desktop.
sub mergedefined {
my $target = shift;
while (@_) {
my $overwrite = shift;
$target->{$_} = $overwrite->{$_} for grep { defined $overwrite->{$_} } keys %$overwrite;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment