I am writing a raffle draw promo using perl and i have the script as below.
what i intend to achieve is to print all the numbers in the array to gui
screen, clear the screen and display randomly selected one as the winner.
however, I have run my script in the cmd line .. it works fine but I
need a colorful GUI to do that.
Can someone guide me on where i can get a solution to it?
I have laid my hand on wxperl but unable to print it.
the code
#!/usr/bin/perl
use warnings;
use strict;
my @hash = (1010000 .. 1019999);
# I collect a big array from the file turn it to array and select at
random some x numbers.
my @testran;
my ($xy, $xz);
for(1..500){
$xy = int(rand($#hash-1));
push @testran, $hash[$xy];
}
for(1..3){
print "\t\n";
print " $_\t" for @testran;
print "\n\n";
}
print "\n"x10;
print "\t\t\t THE WINNING NUMBER IS \t";
my $win_id = int(rand(@testran));
print "$testran[$win_id]\n";
print "\n\n";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/