sub get_counting_hash { my @wordArray = @_; my %wordHash; ## OK so you have an array. You'll need to loop over it. foreach my $word (@wordArray) { ## Now you need to populate the hash ## You assign a value to a hash like ## $wordHash{$key} = $value; ## so you'll need to adapt that to your code } return %wordHash; }
In reply to Re: The Code for counting unique words (help?)
by grep
in thread Just starting out with Perl
by iridius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |