http://qs1969.pair.com?node_id=54063


in reply to Re: Testing a string for a range of characters
in thread Testing a string for a range of characters

Wow - that's an extremely complete writeup :-)

Due to your use of rand 256 to generate the characters, your benchmark is heavily weighted towards non-matching instances. I've split each sub into matching and non-matching versions (comp required three non-matching versions).

I used rand to try and avoid the optimisation that I've read Perl will do to what is in effect a literal; but your method seems to take that into account.

It never ceases to amaze me how much you can learn here :-)

Pete