my @parts = split /.{5}/g;
You probably meant to leave split out of that. I'm not sure because of your comment about a string with a length that isn't a multiple of 5 though... In any case, you were probably adding this at the same time I was adding (the correct version of) it as an afterthought to my own post. That's pretty quick as I added it within seconds... :-P
-sauoq "My two cents aren't worth a dime.";
In reply to Re^3: Split a string into items of constant length
by sauoq
in thread Split a string into items of constant length
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |