use Text::Wrap; $text = $message; @lines = split(/\n/, $text); $lCnt .= $#lines+1; $lineStart = 80; $lineHeight = 24; $Text::Wrap::columns = 35; print wrap('','',@text);