note
tobyink
<p>Using <c>grep</c> and <c>map</c> in a void context is generally discouraged. A <c>for</c> statement modifier is usually clearer, and almost always faster.</p>
<c>
use strict;
use warnings;
use Data::Dumper;
my @array = qw(John Sue Larry Mary John Mary Larry John Joe Lisa John Mary);
my %count;
$count{$_}++ for @array;
print Dumper \%count;
</c>
<div class="pmsig"><div class="pmsig-757127">
<small><small><tt>package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name</tt></small></small>
</div></div>
1036891
1036899