Hi to all Perl gurus:

I am just starting out with Perl and I am taking a class. My teacher is Laotian, so there is somewhat of a language barrier. He's also teaching in a method I am not used to...

So I was hoping someone who could point me in the right direction.

My assignment for class is to take text from a form (using textarea) and analyze the text. It needs to take each unique word and count them, then put them in a table with the number of occurences of each word. I can do the table. I have created the form. I've use if (param()) { to generate the form if there are no values from the form. I've created and assigned each value from the form to a variable:

my @params = param(); my $name = param('fname'); my $email = param('email'); my $text2count = param('text2count'); my $textcolor= param('textcolor'); my $bgcolor= param('bgcolor');
Now I am not sure where to go. I believe I should take the entered text (text2count) and turn it into an array. I'm not asking someone to write the code for me, but if anyone could help me, I would sure appreciate it. Thank you!

In reply to Just starting out with Perl by iridius

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.