my $max_words = 8; open F, "< d:\\temp\\perl\\test.txt" or die "Unable to open file\n"; undef $/; $data = <F>; @words = split /\W+/, $data; print join ':', @words[0..$max_words - 1];
In reply to Re: Counting words
by zejames
in thread Counting words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |