my ($h_run, $t_run, $longest_run) = (0,0,0); while () { if (int rand 2) { # had silly use of flip-flop -- thanks, tlm ++$h_run; $longest_run = $h_run if $h_run > $longest_run; $t_run = 0; } else { #similarly } }
In reply to Re: Runs and Sequences
by Roy Johnson
in thread Runs and Sequences
by twofish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |