http://www.perlmonks.org?node_id=198666


in reply to Re: Character class in an array
in thread Character class in an array

You're repeating that interpolation on every trip through the loop, when you could be using qr// to compile your regex once and then forget about it.

The /o flag on the regex will also work without requiring him to create a regex scalar with qr//.