Help for this page

Select Code to Download


  1. or download this
    $hash =~ s/[^a-zA-Z0-9]//g;
    
  2. or download this
    $ perl -MBenchmark=cmpthese -le 'cmpthese( 500_000, { s => sub { $_ = 
    +q{123#$%abc^&*DEF}; s/[^a-zA-Z0-9]//g }, y => sub { $_ = q{123#$%abc^
    +&*DEF}; y/a-zA-Z0-9//cd; } } )'
          Rate    s    y
    s 174825/s   -- -80%
    y 862069/s 393%   --