Help for this page
use Data::Dumper; ... map { $count{$_}++ } @fruits; print Dumper(\%count);
$VAR1 = { 'GRAPES' => '1', ... 'BANANA' => '1', 'MANGO' => '5' };