Help for this page
my %bias = (1 => 1, 2 => 1);
$rand = $k if rand($sum += $v) <= $v;
# This simplifies to:
# $rand = 1 if rand(1) <= 1
# this is always true. That's wrong.
my $sum = 0;
$sum += $_ foreach (values %bias);
Always on Perls where it is no longer experimental
Sometimes, such as when I deem the syntax to be clearer with it than without
Only if the existing code base uses it or a standards doc mandates it
Never heard of it
I'm still supporting 5.6.0, you insensitive clod!
Results (114 votes). Check out past polls.