in reply to Word wrap

If the text of your file is loaded into the array @text:
use Text::Wrap qw(wrap $columns); $columns = 70; print wrap('', '', @text);