use Text::Wrap; $Text::Wrap::columns = 100; my $truncated = (split /\n/, wrap("", "", $string))[0]; [download]
In reply to Re: substr question by repellent in thread substr question by Anonymous Monk