"be consistent" | |
PerlMonks |
Re: How do you place words from a sentence into an array?by pg (Canon) |
on Oct 26, 2004 at 16:10 UTC ( [id://402673]=note: print w/replies, xml ) | Need Help?? |
As everybody else pointed out, split will save you ;-) What I want to add is, to use hash instead of array in this case. Why not go one step further and make your exercise more meaningful, and think about better data structure.
The benefit of using hash is so that you can count the frequency of each word:
In Section
Seekers of Perl Wisdom
|
|