in reply to Re^2: splitting a string into arbitrary lengths
in thread splitting a string into arbitrary lengths

(un)pack will likely be the fastest way to do this. Don't forget you can put spaces in appropriate places in the pattern to make it easier to read. (I say 'pack' because the useful documentation for 'unpack' is in 'pack'. :-)

---
$world=~s/war/peace/g

  • Comment on Re^3: splitting a string into arbitrary lengths