Help for this page

Select Code to Download


  1. or download this
    use Benchmark qw|:all|;
    
    ...
                  split => sub { my @b = split //, $c }
                 }
            );
    
  2. or download this
    Benchmark: timing 5 iterations of ary, split, substr, unpack...
           ary:  8 wallclock secs ( 8.62 usr +  0.00 sys =  8.62 CPU) @  0
    +.58/s (n=5)
    ...
    substr   2.33   117%     --   -26%   -47%
    ary      1.72   193%    35%     --   -28%
    unpack   1.23   309%    89%    40%     --
    
  3. or download this
    while ($dna =~ /(?=A.{500}T)./g) {
         print "Got an AT match at position ", pos $dna, "\n";
    }