Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    use Benchmark qw/:all/;
    ...
    
    my @words = $code =~ /_[\w_]* | [a-zA-Z]\w*_\w*/gx;
    print "\nWords: ", join(', ', @words);
    
  2. or download this
                Rate split  grep regex
    split 10581141/s    --  -22%  -49%
    grep  13630260/s   29%    --  -34%
    regex 20760455/s   96%   52%    --
    
    Words: is_, _be, some_sample, __code, __0K__, _, _, _