Help for this page

Select Code to Download


  1. or download this
    [~] $ perl -Mre=debug -wle'"x" =~ /x/'
    Freeing REx: `,'
    Compiling REx `x'
    ...
       1 <x> <>               | 10:  END
    Match successful!
    Freeing REx: `[x]'
    
  2. or download this
    [~] $ perl -MBenchmark -we'timethese(-5,{x=>q{"x"=~/x/},"[x]"=>q{"x"=~
    +/[x]/}})'
    Benchmark: running [x], x, each for at least 5 CPU seconds...
           [x]:  4 wallclock secs ( 5.23 usr +  0.00 sys =  5.23 CPU) @ 85
    +2787.57/s (n=4460079)
             x:  6 wallclock secs ( 5.25 usr +  0.00 sys =  5.25 CPU) @ 14
    +99188.19/s (n=7870738)