in reply to Re: Adding one last conditional in a random-number guessing game
in thread Adding one last conditional in a random-number guessing game

exactly that is what I want to do... But can I do it without creating a hash?
  • Comment on Re^2: Adding one last conditional in a random-number guessing game

Replies are listed 'Best First'.
Re^3: Adding one last conditional in a random-number guessing game
by Anonymous Monk on Feb 22, 2014 at 11:16 UTC

    But can I do it without creating a hash?

    I can do it :D But I would just use a hash anyway :)

      Can you point me how then (I mean without using a hash)

        As you can only have 10 games, create an array with the numbers 1 to 10, shuffle it, see List::Util, and then pop the numbers to be guessed

        Can you point me how then (I mean without using a hash)

        Sure, the three basic types are scalars, hashes and arrays -- if you don't want to use a hash, use an array :)