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


in reply to SUBSTR OR REGEX: WHICH WILL YOU FAVOUR?

You can also experiment with unpack '(A3)*', $ARGV[0] for splitting up the string into chunks of length three. pack and unpack have a reputation of being fast too.