Working on on nothing i was doing a card print for bingo.

so its like 10.000 cards every card with 25 numbers (single numbers in other words they cant repeat), 5 coluns per card.

the numbers that will be sorted 1 to 75

so i did that.

#!/usr/bin/perl

#-----------------------------------------------------------------#

#define o numero de cartelas

$cartelas = "10000";

#define os numero q entram no sorteio, sendo eles de 1 ate 75

my @numeros_sorteio = ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39','40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75');

#define quantos numeros uma cartela pode ter, sendo eles 25

$cartelas_limite = "25";

#quantas colunas terao por cartela.

$cartelas_colunas = "5";

#-----------------------------------------------------------------#

print "Content-Type: text/html\n\n";

@cartelas_salvas = "";

open(CARTELAS,">>teste.html");

for ($i=1; $i <= $cartelas; $i++){

print CARTELAS qq|<!-- $i -->\n<br><table border="1"><tr><td>|;

for ($x=1; $x <= $cartelas_limite; $x++) {

$numero = int rand @numeros_sorteio;

print CARTELAS "$numero";

if (($x * 5 == 25) or ($x * 5 == 50) or

($x * 5 == 75) or ($x * 5 == 100) or

($x * 5 == 125)) { print CARTELAS qq|</td></tr><tr><td>|; }

else { print CARTELAS qq|</td><td>|; }

}

print CARTELAS qq|</table> <br>\n\n|;

}

close(CARTELAS);

my problem is, i dont know how to dont make the numbers repeat if i will not use a data base to store numbers.

also i dont know how to order the numbers of that card into a <=> b

so its like 10.000 cards every card with 25 numbers (single numbers in other words they cant repeat), 5 coluns per card.

the numbers that will be sorted 1 to 75

so i did that.

#!/usr/bin/perl

#-----------------------------------------------------------------#

#define o numero de cartelas

$cartelas = "10000";

#define os numero q entram no sorteio, sendo eles de 1 ate 75

my @numeros_sorteio = ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39','40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75');

#define quantos numeros uma cartela pode ter, sendo eles 25

$cartelas_limite = "25";

#quantas colunas terao por cartela.

$cartelas_colunas = "5";

#-----------------------------------------------------------------#

print "Content-Type: text/html\n\n";

@cartelas_salvas = "";

open(CARTELAS,">>teste.html");

for ($i=1; $i <= $cartelas; $i++){

print CARTELAS qq|<!-- $i -->\n<br><table border="1"><tr><td>|;

for ($x=1; $x <= $cartelas_limite; $x++) {

$numero = int rand @numeros_sorteio;

print CARTELAS "$numero";

if (($x * 5 == 25) or ($x * 5 == 50) or

($x * 5 == 75) or ($x * 5 == 100) or

($x * 5 == 125)) { print CARTELAS qq|</td></tr><tr><td>|; }

else { print CARTELAS qq|</td><td>|; }

}

print CARTELAS qq|</table> <br>\n\n|;

}

close(CARTELAS);

my problem is, i dont know how to dont make the numbers repeat if i will not use a data base to store numbers.

also i dont know how to order the numbers of that card into a <=> b