I like to avoid the string version of anything that resolves to eval. You may get better error messages by changing it to:

cmpthese (-5,{ me => sub { mymatch($str,2,@arr) }, jk => sub { amatch($str,['2'],@arr) }, });
(The escapes on @arr or lack thereof are confusing me...)


In reply to Re: Benchmarking String::Approx by Tanktalus
in thread Benchmarking String::Approx by monkfan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":