programming-examples/perl/SystemFunction/Using foreach loop to create a list of random number.pl

4 lines
96 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
print "Some lottery numbers to try:";
foreach (1 .. 6) {
print " " . int rand (50) + 1;
}