You mean a substitution. Only the fist half of a substitution is a regular expression.
It's not that hard.
Mind you, Text::Wrap does a far better job than this simple substitution. I'm not recommending to use it instead.my $l_max = 30; $str =~ s/(.{0,$l_max}) /$1\n/g;
Anno
In reply to Re: Breaking the lines
by Anno
in thread Breaking the lines
by Ben Win Lue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |