http://qs321.pair.com?node_id=461914


in reply to Re: Tiny little paragraph wrapper
in thread Tiny little paragraph wrapper

Try this regex s/(.{5,12}\s+)/$1\n/g. On the sample text it gives: :-)
Check out http://www.perlmonks.org/?node_id=438189 (it has nice line-wrapping snippet).