He Brian,
In Perl, you don't have to declare your variables if you don't want to.
You are building the count hash on the fly here. All you are doing is
incrementing itself by one everytime the word is found.
@words=('test','this','that','test');
for $word (@words) {
$count{$word}=$count{$wor
e hash to lookup the value it is storing for
the key called $key.
Hope this is clear and of some use. Good luck learning Perl.
John
-----Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 20 December 2001 11:53
To: [EMAIL PROTECTED]
Subject: Cant figure out how key'
Hi there,
Very new to PERL (chapter 5 Learning PERL edition 2!!) but I am determined
to master this!! Or at least be good at it!!
I'm having trouble grasping the code below. I know it's a small snippet but
I think it's important.
Can you please explain the $count variable and how the %count cam