Re: Frequency of words

2004-03-01 Thread R. Joseph Newton
Vishal Vasan wrote: > Hello all, > > Sorry to reply so late. Here is the code that worked for me. > use strict; use warnings; > > my %frequency_words = (); > > while(<>){ >chomp; >$frequency_words{$_}++; > }

Re: Frequency of words

2004-02-29 Thread Vishal Vasan
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){ pri

Re: Frequency of words

2004-02-26 Thread Rob Dixon
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]

Re: Counting frequency of words.

2004-02-25 Thread WC -Sx- Jones
[... an oldie but a goodie -- don't remember the original author. -Sx-] =pod #!C:\perl\bin\perl.exe #!/usr/bin/perl # A Perl filter that will take the selected text, sort the # words, put into a column, remove duplicates, then output a # word count by each. use strict; my %count; while () {

Re: Counting frequency of words.

2004-02-25 Thread Rob Dixon
Vishal Vasan wrote: > > I have to find the frequency of occurance of all (mail code: This is the > first 8 characters of the line) in a huge file. Instead of doing it in C > I am trying it out in perl. I am trying hashes for this. Whenever a new > code comes, the count has to be incremented. > > Th

Frequency of words

2004-02-25 Thread Vishal Vasan
Hi All, It has worked. Many Thanks, Regards, Vishal Vasan. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Counting frequency of words.

2004-02-25 Thread Vishal Vasan
Hello All, I have to find the frequency of occurance of all (mail code: This is the first 8 characters of the line) in a huge file. Instead of doing it in C I am trying it out in perl. I am trying hashes for this. Whenever a new code comes, the count has to be incremented. This is the code tha