Hello all,

Sorry to reply so late. Here is the code that worked for me.
--------------------------------------------------------------------------------
%frequency_words = ();

while(<>){
  chomp;
  $frequency_words{$_}++;
}

@words_found = keys %frequency_words;

foreach $word (@words_found){
  print "$word: $frequency_words{$word}\n";
}

If the above script is placed in the file by name find_freq_words.pl, then the script is called as
find_freq_words.pl <input filename> > <output filename>
---------------------------------------------------------------------------------


Regards,
Vishal Vasan.

Rob Dixon wrote:

Vishal Vasan wrote:


It has worked.

Many Thanks,



Thanks Vishal.


I'm glad it worked for you.

It would be good if you show some of your final code.

Rob








-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to