Help for this page
my @probs =(0,0.1,0.53,0.51,0.59,0.67,0.2,0.04,0.05,0.56,0.89,0.75); my $t; print $_ . (",","\n")[$t=1-$t] for grep {($probs[$_] >=.5 .. $probs[$_]> .5) and $t=!$t } 0..$#probs
2,4 9,11