Help for this page

Select Code to Download


  1. or download this
    my $text_orig = "The respondent uses the following products XXX, YYYYY
    +YYYY, ZZZZZZZ around the house and they are considering using QQQQQQQ
    + too. They are particularly impressed with ZZZZZZZ.\n";
    
    ...
    
       print($text_new);
    }
    
  2. or download this
    use List::Util qw( shuffle );
    
    ...
    
       print($text_new);
    }
    
  3. or download this
    for (1..4) {
       my %picked;
    ...
    
       print($text_new);
    }
    
  4. or download this
    use Benchmark qw( cmpthese );
    
    ...
       b => sub { keys(%b) == 1; },
       c => sub { keys(%c) == 1; },
    });
    
  5. or download this
           Rate   a   c   b
    a 2314690/s  -- -1% -5%
    c 2340571/s  1%  -- -4%
    b 2429401/s  5%  4%  --