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((unpack("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";} #### use HotBits; my $HotBits = new HotBits::; my $val=$HotBits->request (32); $val=unpack('%32b*', $val)%2; if($val==1){print "Heads\n";}else{print "Tails\n";}