in reply to Re: Re: Word Counting (contractions)
in thread Word Counting
You're so nearly there...you just need to replace a single line there with the line that perlplexer already gave you, which loops over the list from 'split' (using 'for' or 'foreach' - they're synonymous, so you use whichever one you think looks nicer - don't you love a language that takes aesthetics into account?) and increments the value in a corresponding 'words' hash. I'm not going to tell you though which line that is I'm afraid, 'cos methinks the student protesteth overmuch about this not being homework...I prescribe a healthy dose of Camel :)
Cheers,
Ben
|
|---|