Help for this page

Select Code to Download


  1. or download this
        /$variable/
    
  2. or download this
        /$variable/o
    
  3. or download this
        use Benchmark;
    
    ...
          'string/o' => sub { $string =~ /$str_regex/o },
          'qr'       => sub { $string =~ /$qr_regex/   },
               });
    
  4. or download this
    Benchmark: timing 10000000 iterations of qr, string, string/o...
            qr: 11 wallclock secs (10.60 usr +  0.00 sys = 
    ...
              11.80 CPU) @ 847457.63/s (n=10000000)
      string/o:  7 wallclock secs ( 9.40 usr +  0.02 sys =  
               9.42 CP    U) @ 1061571.13/s (n=10000000)