Help for this page

Select Code to Download


  1. or download this
    use HotBits;
    my $x = new HotBits::;
    my $n1 = $x->request (32);
    my $n2 = $x->request (32);
    if((unpack("i*",$n1))>(unpack("i*",$n2))){print "Heads\n";}elsif((unpa
    +ck("i*",$n1))==(unpack("i*",$n2))){print "The coin flew out of sight,
    + sorry. No answer, and you're out \$0.25.\n";}else{print "Tails\n";}
    
  2. or download this
    use HotBits;
    my $HotBits = new HotBits::;
    
    ...
    $val=unpack('%32b*', $val)%2;
    
    if($val==1){print "Heads\n";}else{print "Tails\n";}