Try Text::Wrap
poj#!perl use strict; use Text::Wrap; $Text::Wrap::columns = 80; my $text = q!I have a Russian article (Unicode) that I pasted into a p +lain-text file from a website, meaning each paragraph takes up one "l +ine", and i'd like to be able to read it comfortably in a terminal, i +.e. with wrapping on word boundaries instead of the teminal edge. fol +d does not handle the Unicode characters correctly - word boundaries +are ignored and some characters are mangled by the line breaks.!; print wrap('', '', $text);
In reply to Re: making a regex work with Unicode
by poj
in thread making a regex work with Unicode
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |