in reply to Re: How do I just count any words from a file?
in thread How do I just count any words from a file?

In reply to both of you, thank you very very very much :) Basically it's a project connected with my course. I had to create a simple .txt file containing the verse "Hey diddle diddle...", request input of and test the filename format, test the files existence and size, then count the characters, words, paragraphs etc in it, then print them to <STDOUT>. I've managed the characters and lines parts, but hit a wall of mental block when it came to the words etc. Anyway, that part now works, and I can move onto the paragraphs and and sentences to complete it. Although I've come to the end of learning Perl through my course, I'm a bit of a stubborn wench and refuse to let it go. I struggled with the implementation of it, despite getting high marks for the theory, and I'm not satisfied with my performance to date. Therefore, I'd like very much to stay with Perl Monks and use the exercises/examples here to further develop in this field. Respect *bows* Caz :)
  • Comment on Re^2: How do I just count any words from a file?

Replies are listed 'Best First'.
Re^3: How do I just count any words from a file?
by jettero (Monsignor) on Jun 04, 2007 at 13:01 UTC
    Spend as much time on learning regular expressions as is necessary to really understand and enjoy them. You won't regret it. All the modern high level languages (and even some low level ones) seem to support them now, so it's worth spending the effort on it no matter whether it's for a class or not.

    -Paul