#!/usr/bin/perl
use strict;
my @sentence = qw(Bha Bha Black Sheep);
my $sentence_length = @sentence;
my %word_count;
for my $word (@sentence)
{
$word_count{$word}++;
}
print %word_count;
#!/usr/bin/perl
use strict;
my @sentence = qw(Bha Bha Black Sheep);
my $sentence_length = @sentence;
my %word_count;
for my $word (@sentence)
{
$word_count{$word}++;
}
print %word_count;