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


in reply to How can I split a string into chunks of size n bytes?

push @bits, substr $scalar, 0, $bytes, '' while length $scalar;