Philip Potter wrote:
> My question runs deeper than this. What are the criteria? When are
> curlies a bare block and when are they an anonymous hash? What are the
> grammar rules? How could I have known a priori to put a "return" or
> "+" in?
>
> The camel book page 247 says "you may occasionally
2009/11/12 Peter Scott :
> On Thu, 12 Nov 2009 09:55:39 +, Philip Potter wrote:
>> 2009/11/11 Shawn H Corey :
>>> no warnings 'once';
>>> my @aoh = pairwise { +{ %{$a}, %{$b} } } @aoh_a, @aoh_b;
>>
>> Thanks for your response. What are the grammar rules here? Why must I
>> use an explicit retur
On Thu, 12 Nov 2009 09:55:39 +, Philip Potter wrote:
> 2009/11/11 Shawn H Corey :
>> no warnings 'once';
>> my @aoh = pairwise { +{ %{$a}, %{$b} } } @aoh_a, @aoh_b;
>
> Thanks for your response. What are the grammar rules here? Why must I
> use an explicit return or unary + operator? Why is it
2009/11/11 Shawn H Corey :
> Philip Potter wrote:
>> my @aoh = pairwise { { %{$a}, %{$b} } } @aoh_a, @aoh_b;
>
> no warnings 'once';
> my @aoh = pairwise { +{ %{$a}, %{$b} } } @aoh_a, @aoh_b;
Thanks for your response. What are the grammar rules here? Why must I
use an explicit return or unary + op
Philip Potter wrote:
> I am playing with List::MoreUtils::pairwise and noticed some funny
> behaviour.
> p...@tui:~/tmp$ cat bar.pl
> use strict;
> use warnings;
>
> use List::MoreUtils qw(pairwise);
> use Data::Dumper;
>
> my @aoh_a = ( { foo => 1, bar => 2 }, {foo => 3, bar => 4} );
> my @aoh_b
I am playing with List::MoreUtils::pairwise and noticed some funny
behaviour. I'm trying to merge two lists of hashes into one list of
hashes:
p...@tui:~/tmp$ cat bar.pl
use strict;
use warnings;
use List::MoreUtils qw(pairwise);
use Data::Dumper;
my @aoh_a = ( { foo => 1, bar => 2 }, {foo => 3,