Help for this page

Select Code to Download


  1. or download this
    $re = qr/$regex/;
    
    $_ =~ $re;
    
  2. or download this
    use Benchmark;
    
    ...
        b => sub { $b->(qw(this is a test bob and jobe)) },
        c => sub { grep $pat, qw(this is a test bob and jobe) }
    });
    
  3. or download this
    Benchmark: timing 100000 iterations of a, b, c...
             a:  7 wallclock secs ( 5.92 usr +  0.00 sys =  5.92 CPU) @ 16
    +891.89/s (
    ...
    n=100000)
             c:  0 wallclock secs ( 0.62 usr +  0.00 sys =  0.62 CPU) @ 16
    +1290.32/s
    (n=100000)