in reply to Re: Help with Guessing Game
in thread Help with Guessing Game

I'm really confused at this point, my instructor told me to get all the guessing and put them in an array so are you saying I should use push to add onto the @allguess array each time the user enters a number. As you can see I'm very new to this, the other problem I'm having is using the grep function to see if the number has been guessed.

Replies are listed 'Best First'.
Re^3: Help with Guessing Game
by ww (Archbishop) on May 11, 2013 at 13:45 UTC
    1. I don't understand the intent of your first sentence here. Are you objecting that the PM solution offered (seems to you) to vary from your instructor's directions? If so, trust choroba's trouble-shooting. Push (see also next graf) allows you to add new elements to an array. When inside a loop, assigning a value to the array REPLACES whatever was in the array on the last iteration of the loop.
    2. Perhaps your instructor mentioned using your command line to obtain local help;
      C:\> perldoc -f push
      or
      C:\> perldoc -f grep
    There are many more sources of help local to your computer. See, for instance, perldoc perldoc and many others.

    If you didn't program your executable by toggling in binary, it wasn't really programming!

Re^3: Help with Guessing Game
by Anonymous Monk on May 11, 2013 at 14:07 UTC