A (Very) Small Perl Game

Status
Not open for further replies.

sourav123

Thinking Different
A few into after starting with Perl, I have managed to write a small and simple perl game. It does not do big things but can be used as a timepass. The idea is about guessing a random number correctly. Every time you run the program, it will create a random number between 1 to 100. As you enter your guess, it will tell you whether your guess is more or less than the number. The program finishes when you guess the correct number. The point is to minimize the number of wrong attempts.

Below is the source code for the game written in Perl. You will need a Perl interpreter to execute this. After you have Perl, type perl random_guess.pl to execute the program after you save it in a file random_guess.pl

Please find the sourcecode here: *pastebin.com/f3ebc28cb

Let me know your comments.
 
Last edited:
Status
Not open for further replies.
Top Bottom