Forum: Perl Jan 20th, 2009 |
| Replies: 8 Views: 984 int(rand 10) returns numbers in the range 0 to 9
int (rand 10)+1 returns numbers in the range 1 to 10
while(1) is a continuous loop...it will keep looping until you 'break' or 'last'. |
Forum: Perl Jan 20th, 2009 |
| Replies: 8 Views: 984 I agree with Comatose, you should probably put the part that prompts for and accepts new input inside the loop somehow. That way as the loop is run again you ask for input again.
The psuedo-code... |