#!/usr/bin/perl
use CGI ':standard';
use CGI::Carp "fatalsToBrowser";
use strict;
use warnings;
my $i = 1 + (param('i') || 0);
my $firstroll1 = param('roll1');
my $firstroll2 = param('roll2');
print header;
my $dice1 = 1 + int rand 6;
my $dice2 = 1 + int rand 6;
print "($i) $dice1, $dice2
";
if (!$firstroll1 || !$firstroll2) {
$firstroll1 = $dice1;
$firstroll2 = $dice2;
my $sum = $dice1 + $dice2;
if ( $sum == 7 || $sum == 11 ) {
print "you win";
print qq{