in reply to Breaking the lines
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
|
|---|