Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
here is my set task: i am stuck on the step 3 which check generated letter can only use once. how can i implement that? 1. Output 8 randomly generated characters and ask user if the letters are acceptable 2. Input word 3. Check word can be made from the 8 randomly generated characters (make sure letters only used once in the randomly generated word are only used once in the entered word) 4. If Step 3. is OK, check word is in dictionary. If the word is not in the dictionary then ask the user if it is a real word - if it is then it is added to a dictionary file. 5. If Step 4. is OK, add number of points (one point per letter in the word entered) to a score and ensure that the same word cannot be entered again 6. Repeat steps 2.-5. until the user cannot think of any more words and enters a sentinel value 7. The final score for that game should be displayed and added to a high scores table (in the correct position - highest at the top, lowest at the bottom) 8. Display the high scores table (suitably formatted) 9. Ask the user if they would like another game, if they do repeat steps 1. to 8.

In reply to Need help with Peal! by ivanzhibin

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (10)
    As of 2018-06-18 17:47 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (110 votes). Check out past polls.