From: Dobrica Pavlinusic Date: Fri, 25 Jun 2010 16:45:28 +0000 (+0200) Subject: example reduce code to use $out, $key and $value X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=474f7ef3c12aa30d3dddd162bfa7d14543502e1e;p=MojoFacets.git example reduce code to use $out, $key and $value --- diff --git a/public/code/autor.citata.pl b/public/code/autor.citata.pl new file mode 100644 index 0000000..9b1d15f --- /dev/null +++ b/public/code/autor.citata.pl @@ -0,0 +1,7 @@ +$key = 'autor'; $value = 'citata'; + +foreach my $a ( @{ $row->{autor_full} } ) { + foreach my $c ( @{ $row->{broj_citata} } ) { + $out->{$a} += $c; + } +}