in reply to Re: Word Counting (contractions)
in thread Word Counting
my $file = "test.txt"; my $count = "0"; open (FILE, $file) or die "Error $!"; my $words = <FILE>; $count++ for split /\s+/, $words; print "Count: $count\n"; print "Words: $words\n"; close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Word Counting (contractions)
by benn (Vicar) on Apr 24, 2003 at 23:40 UTC |