If you're running a recent verion of Perl (>5.8.0 if memory serves), the I'd go with unpack per ccn, but use the parens template syntax:
print for unpack '(a3)*', 'the quick brown fox jumps over the lazy dog +';; the qu ick br own fo x j ump s o ver th e l azy do g
In reply to Re: chopping a string into slices - is there a more elegant way to do it?
by BrowserUk
in thread chopping a string into slices - is there a more elegant way to do it?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |