On 15-04-2004 at 18:19, Martin Edenhofer wrote: >How about lines with more the $NewLine chars? Do you know an regexp >to insert an \n bevor $NewLine is reached?
I think that there's no single regexp to do that; a loop should be used, or (better!) the Text::Wrap module. It is a standard module, so there is no blocking dependency with adding it: http://www.perldoc.com/perl5.8.0/lib/Text/Wrap.html This would do the job for us: use Text::Wrap; (...) $Text::Wrap::columns = $NewLine; $Text::Wrap::huge = 'overflow' #This prevents us from breaking URLs $Self->{Body} = wrap( '', '', $Self->Body ); Why not checking this code in right now? ;-)))) --Alessandro. _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
