Help for this page

Select Code to Download


  1. or download this
    my @letters = qw (A B C D E F);
    my $string = "AFTYUBEWTWECRTUTYIYTDDDDRYJURTHJTREEEEEFGSDFF";
    ...
    D : 5
    E : 7
    F : 4
    
  2. or download this
    use Benchmark;
    my @letters = qw (A B C D E F);
    ...
    Benchmark: timing 1000 iterations of match, subst...
         match: 10 wallclock secs ( 2.52 usr +  0.01 sys =  2.53 CPU) @ 39
    +5.26/s (n=1000)
         subst:  2 wallclock secs ( 1.88 usr +  0.01 sys =  1.89 CPU) @ 52
    +9.10/s (n=1000)