my $string = 'this is a test message'; my ($chunk) = $string =~ /(.{1,12})\b/; [download]
In reply to Re: Splitting a string into words by borisz in thread Splitting a string into words by webchalkboard