On Wed, Jun 8, 2011 at 11:30, Jon Forsyth <[email protected]> wrote:
This part:
> foreach (%word_count){
> print "$word_count{$_}\n\n";
> }
You want to write like this:
foreach my $key ( keys %word_count ) {
print "$word_count{$key}\n\n";
}
What you've got above is getting both keys *and* values from the hash,
and you're getting that error when values are used as keys in the
lookup.
chrs,
john.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/