There's no reason to invoke something as heavy-duty as the regular expression engine when all you're working with is substrings of a given length.
my $s; print "$s\n" while $s = substr $str, 0, 100, '';
-- I hate storms, but calms undermine my spirits. -- Bernard Moitessier, "The Long Way"
In reply to Re^2: Printing Fixed Width Strings and Spliting String into Multiple Lines
by oko1
in thread Printing Fixed Width Strings and Spliting String into Multiple Lines
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |