- or download this
print join ' ', unpack '(a10)*', "$_\n" for unpack '(a50)*', $str;
- or download this
print "" . join ' ', unpack '(a10)*', $_ . "\n" for unpack '(a50)*', $
+str;
- or download this
for ($str =~ /.{1,50}/g) {print join " ", /.{1,10}/g; print "\n"}