in reply to A call to keyboards: Better chatterbox wrapping

A few more examples would help. I'm only inserting the newline to make it easy to see where I adding the spaces.

#! perl -slw use strict; use Inline::Files; select OUTPUT; while( <DATA> ) { s[(.{9,18})(?=\b\W)][$1 \n]g; print; } __DATA__ for(1..20){$bar=$bop[1];print"$bar/$baz,$foo[$baz]"} for(1..20)%7B%24bar%3D%24bop%5B1%5D%3Bprint%22%24bar%2F%20%24baz%2C%24 +foo%5B%24baz%5D%22%7D __OUTPUT__ for(1..20){$bar =$bop[1];print "$bar/$baz,$foo [$baz]"} for(1..20)%7B %24bar%3D%24bop %5B1%5D%3Bprint%22 %24bar%2F%20%24baz %2C%24foo%5B%24baz %5D%22%7D

Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.