in reply to Forcing a string with no spaces to wrap to fit on the screen

You could use the Text::Wrap module. Straight from the docs:
use Text::Wrap; $Text::Wrap::columns=10; print wrap "", "", "This is a long string and should be wrapped."; # prints # This is a # long # string # and # should be # wrapped.
This code will also work if there are no spaces in your text.