Hi, Members The script below produce an error at the printf function at line 342 which says "Illegal division by zero at \perl\baccarat.pl line 342.". Can someone tell me whats wrong. Thanks
====partial script=================== my $total = $banker_counter + $player_counter; open (BACCARAT_DATA,">>BACCARAT_DATA.txt") || die $!; print BACCARAT_DATA "\n"; # the error starts here which is line 342 printf BACCARAT_DATA "Total: Banker = $banker_counter (%2.0f%%), Player = $player_counter (%2.0f%%),". " Tie = $draw_counter (%2.0f%%).\n", (($banker_counter / $total) * 100) , (($player_counter / $total) * 100) , (($draw_counter / ( $banker_counter + $player_counter + $draw_counter )) * 100 );