Booya!

On Mon, Oct 29, 2012 at 9:04 PM, Ran Eilam <[email protected]> wrote:

> Returning a new value instead of mutating the sub arguments:
>
> sub combine_values {
>   my $old = shift;
>   my $new  = shift;
>   return map {$_ => {
>       %{ $old->{$_} },
>       %{ $new->{$_} || {} }
>   }} keys %$old;
> }
>
> Ran
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to