#!/usr/bin/perl use strict; use warnings; use CGI; use Cards; # random.pl.cgi - 52 pickup? # Copyright (C) 2003 Daniel Allen da@coder.com # All rights reserved. # print CGI::PrintHeader(); print Cards::PrintHeader(); my @suits = qw(S H C D); my @names = ((2 .. 10), qw(A K Q J)); my $c = Cards->new; my ($left,$top); foreach my $suit ((@suits)) { foreach my $name ((@names)) { $c->set_suit($suit); $c->set_name($name); $left = rand(30); $top = rand(20); $c->set_style("left:${left}em;top:${top}em;"); print qq{}; $c->print; print "\n"; } } print Cards::PrintFooter();