in reply to Re^2: hmap revisited
in thread hmap revisited

Just a precedence issue. Add parens.
my %new2 = hmap { $_[1]{nick} =~ /rbush|fred/ ? ( $_[0] => { hmap { $_[0], $_[1] } %{$_[1]} } ) : () } %$h;
my $new2 = hmap { $_[1]{nick} =~ /rbush|fred/ ? ( $_[0] => hmap { $_[0], $_[1] } $_[1] ) : () } $h;