Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    
    # randomly selected key is...
    print "$key selected\n";
    
  2. or download this
    my $value_sum = eval join '+', values %hash;
    my $rnd_num = int(rand($value_sum ));