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 :)

In reply to Re^2: How do I just count any words from a file? by Cazbo
in thread How do I just count any words from a file? by Cazbo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.